mirror of
https://github.com/intel/llvm.git
synced 2026-02-08 00:50:03 +08:00
Add minor doc improvements (#70984)
- Document legacy ops lowered by `convert-func-to-llvm` and link it to a GH issue - Document the need for bufferization before `convert-linalg-to-loops` - Document the ops lowered by `expand-strided-metadata`.
This commit is contained in:
@@ -391,6 +391,10 @@ def ConvertFuncToLLVMPass : Pass<"convert-func-to-llvm", "ModuleOp"> {
|
||||
1 value is returned, packed into an LLVM IR struct type. Function calls and
|
||||
returns are updated accordingly. Block argument types are updated to use
|
||||
LLVM IR types.
|
||||
|
||||
Note that until https://github.com/llvm/llvm-project/issues/70982 is resolved,
|
||||
this pass includes patterns that lower `arith` and `cf` to LLVM. This is legacy
|
||||
code due to when they were all converted in the same pass.
|
||||
}];
|
||||
let dependentDialects = ["LLVM::LLVMDialect"];
|
||||
let options = [
|
||||
|
||||
@@ -69,6 +69,13 @@ def LinalgLowerToAffineLoops : Pass<"convert-linalg-to-affine-loops"> {
|
||||
|
||||
def LinalgLowerToLoops : Pass<"convert-linalg-to-loops"> {
|
||||
let summary = "Lower the operations from the linalg dialect into loops";
|
||||
let description = [{
|
||||
Lowers the `linalg` ops to loop nests using `scf.for`.
|
||||
|
||||
Pre-condition: the operands used by the `linalg` ops have buffer semantics,
|
||||
i.e., tensor operands and results must be converted to memrefs via
|
||||
bufferization.
|
||||
}];
|
||||
let constructor = "mlir::createConvertLinalgToLoopsPass()";
|
||||
let dependentDialects = [
|
||||
"linalg::LinalgDialect",
|
||||
|
||||
@@ -196,6 +196,14 @@ def ExpandStridedMetadata : Pass<"expand-strided-metadata"> {
|
||||
In particular, this pass transforms operations into explicit sequence of
|
||||
operations that model the effect of this operation on the different metadata.
|
||||
This pass uses affine constructs to materialize these effects.
|
||||
|
||||
Supported ops include:
|
||||
|
||||
- `memref.collapse_shape`
|
||||
- `memref.expand_shape`
|
||||
- `memref.extract_aligned_pointer_as_index`
|
||||
- `memref.extract_strided_metadata`
|
||||
- `memref.subview`
|
||||
}];
|
||||
let constructor = "mlir::memref::createExpandStridedMetadataPass()";
|
||||
let dependentDialects = [
|
||||
|
||||
@@ -804,7 +804,8 @@ struct ConvertFuncToLLVMPass
|
||||
RewritePatternSet patterns(&getContext());
|
||||
populateFuncToLLVMConversionPatterns(typeConverter, patterns, symbolTable);
|
||||
|
||||
// TODO: Remove these in favor of their dedicated conversion passes.
|
||||
// TODO(https://github.com/llvm/llvm-project/issues/70982): Remove these in
|
||||
// favor of their dedicated conversion passes.
|
||||
arith::populateArithToLLVMConversionPatterns(typeConverter, patterns);
|
||||
cf::populateControlFlowToLLVMConversionPatterns(typeConverter, patterns);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user