[mlir][NFC] Cleanup Passes documentation

- Fix a place of NVGPU dialect's pass
- Move a summary of `-finalize-memref-to-llvm` into description
- Fix broken links
- Replace back-quote dialect headers with single-quote headers for
  improved readability.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D142868
This commit is contained in:
Kohei Yamaguchi 2023-02-27 16:34:59 +01:00 committed by Alex Zinenko
parent 115711c19c
commit b46e78c7cb
4 changed files with 37 additions and 31 deletions

View File

@ -16,39 +16,43 @@ This document describes the available MLIR passes and their contracts.
[include "ConversionPasses.md"] [include "ConversionPasses.md"]
## `async` Dialect Passes ## 'async' Dialect Passes
[include "AsyncPasses.md"] [include "AsyncPasses.md"]
## `affine` Dialect Passes ## 'affine' Dialect Passes
[include "AffinePasses.md"] [include "AffinePasses.md"]
## `arith` Dialect Passes ## 'arith' Dialect Passes
[include "ArithPasses.md"] [include "ArithPasses.md"]
## `func` Dialect Passes ## 'func' Dialect Passes
[include "FuncPasses.md"] [include "FuncPasses.md"]
## `gpu` Dialect Passes ## 'gpu' Dialect Passes
[include "GPUPasses.md"] [include "GPUPasses.md"]
## `linalg` Dialect Passes ## 'linalg' Dialect Passes
[include "LinalgPasses.md"] [include "LinalgPasses.md"]
## `llvm` Dialect Passes ## 'llvm' Dialect Passes
[include "LLVMPasses.md"] [include "LLVMPasses.md"]
## `memref` Dialect Passes ## 'memref' Dialect Passes
[include "MemRefPasses.md"] [include "MemRefPasses.md"]
## `quant` Dialect Passes ## 'nvgpu' Dialect Passes
[include "NVGPUPasses.md"]
## 'quant' Dialect Passes
[include "QuantPasses.md"] [include "QuantPasses.md"]
@ -56,31 +60,31 @@ This document describes the available MLIR passes and their contracts.
[include "ReducerPasses.md"] [include "ReducerPasses.md"]
## `scf` Dialect Passes ## 'scf' Dialect Passes
[include "SCFPasses.md"] [include "SCFPasses.md"]
## `shape` Dialect Passes ## 'shape' Dialect Passes
[include "ShapePasses.md"] [include "ShapePasses.md"]
## `sparse_tensor` Dialect Passes ## 'sparse_tensor' Dialect Passes
[include "SparseTensorPasses.md"] [include "SparseTensorPasses.md"]
## `spv` Dialect Passes ## 'spv' Dialect Passes
[include "SPIRVPasses.md"] [include "SPIRVPasses.md"]
## `tensor` Dialect Passes ## 'tensor' Dialect Passes
[include "TensorPasses.md"] [include "TensorPasses.md"]
## `transform` Dialect Passes ## 'transform' Dialect Passes
[include "TransformPasses.md"] [include "TransformPasses.md"]
## `vector` Dialect Passes ## 'vector' Dialect Passes
[include "VectorPasses.md"] [include "VectorPasses.md"]

View File

@ -636,11 +636,14 @@ def ConvertMathToFuncs : Pass<"convert-math-to-funcs", "ModuleOp"> {
def FinalizeMemRefToLLVMConversionPass : def FinalizeMemRefToLLVMConversionPass :
Pass<"finalize-memref-to-llvm", "ModuleOp"> { Pass<"finalize-memref-to-llvm", "ModuleOp"> {
let summary = "Finalize the conversion of the operations from the MemRef " let summary = "Finalize MemRef dialect to LLVM dialect conversion";
"dialect to the LLVM dialect." let description = [{
"This conversion will not convert some complex MemRef " Finalize the conversion of the operations from the MemRef
"operations. Make sure to run `expand-strided-metadata` " dialect to the LLVM dialect.
"beforehand for these."; This conversion will not convert some complex MemRef
operations. Make sure to run `expand-strided-metadata`
beforehand for these.
}];
let dependentDialects = ["LLVM::LLVMDialect"]; let dependentDialects = ["LLVM::LLVMDialect"];
let options = [ let options = [
Option<"useAlignedAlloc", "use-aligned-alloc", "bool", /*default=*/"false", Option<"useAlignedAlloc", "use-aligned-alloc", "bool", /*default=*/"false",

View File

@ -48,18 +48,17 @@ def NormalizeMemRefs : Pass<"normalize-memrefs", "ModuleOp"> {
let summary = "Normalize memrefs"; let summary = "Normalize memrefs";
let description = [{ let description = [{
This pass transforms memref types with a non-trivial This pass transforms memref types with a non-trivial
[layout map](https://mlir.llvm.org/docs/LangRef/#layout-map) into [layout map](https://mlir.llvm.org/docs/Dialects/Builtin/#affine-map-layout)
memref types with an identity layout map, e.g. (i, j) -> (i, j). This into memref types with an identity layout map, e.g. (i, j) -> (i, j). This
pass is inter-procedural, in the sense that it can modify function pass is inter-procedural, in the sense that it can modify function
interfaces and call sites that pass memref types. In order to modify interfaces and call sites that pass memref types. In order to modify
memref types while preserving the original behavior, users of those memref types while preserving the original behavior, users of those
memref types are also modified to incorporate the resulting layout map. memref types are also modified to incorporate the resulting layout map.
For instance, an [AffineLoadOp] For instance, an [AffineLoadOp](https://mlir.llvm.org/docs/Dialects/Affine/#affineload-mliraffineloadop)
(https://mlir.llvm.org/docs/Dialects/Affine/#affineload-affineloadop)
will be updated to compose the layout map with with the affine expression will be updated to compose the layout map with with the affine expression
contained in the op. Operations marked with the [MemRefsNormalizable] contained in the op. Operations marked with the
(https://mlir.llvm.org/docs/Traits/#memrefsnormalizable) trait are [MemRefsNormalizable](https://mlir.llvm.org/docs/Traits/#memrefsnormalizable)
expected to be normalizable. Supported operations include affine trait are expected to be normalizable. Supported operations include affine
operations, memref.alloc, memref.dealloc, and func.return. operations, memref.alloc, memref.dealloc, and func.return.
Given an appropriate layout map specified in the code, this transformation Given an appropriate layout map specified in the code, this transformation

View File

@ -133,7 +133,7 @@ def LocationSnapshot : Pass<"snapshot-op-locations"> {
``` ```
* If set, the new location is fused with the original location in the form * If set, the new location is fused with the original location in the form
of a [`Name Location`](Diagnostics.md#name-location) with the specified tag. of a [`Name Location`](Dialects/Builtin.md/#nameloc) with the specified tag.
Example: Example:
@ -187,7 +187,7 @@ def StripDebugInfo : Pass<"strip-debuginfo"> {
let summary = "Strip debug info from all operations"; let summary = "Strip debug info from all operations";
let description = [{ let description = [{
This pass strips the IR of any location information, by replacing all This pass strips the IR of any location information, by replacing all
operation locations with [`unknown`](Diagnostics.md#unknown-location). operation locations with [`unknown`](Dialects/Builtin.md/#unknownloc).
}]; }];
let constructor = "mlir::createStripDebugInfoPass()"; let constructor = "mlir::createStripDebugInfoPass()";
} }
@ -199,7 +199,7 @@ def SymbolDCE : Pass<"symbol-dce"> {
by computing the set of operations that are known to be live, propagating by computing the set of operations that are known to be live, propagating
that liveness to other symbols, and then deleting all symbols that are not that liveness to other symbols, and then deleting all symbols that are not
within this live set. Live symbols are those that have a within this live set. Live symbols are those that have a
[visibility](SymbolsAndSymbolTables.md#symbol-visibility) that extends [visibility](SymbolsAndSymbolTables.md/#symbol-visibility) that extends
beyond the IR, e.g. `public`, or those that are referenced by live symbols beyond the IR, e.g. `public`, or those that are referenced by live symbols
or other non-Symbol operations. or other non-Symbol operations.