[Mlir-commits] [mlir] 9451440 - [mlir][docs] Fix pass manager document

Rajas Vanjape llvmlistbot at llvm.org
Tue Jul 19 12:53:12 PDT 2022


Author: Rajas Vanjape
Date: 2022-07-19T19:52:57Z
New Revision: 9451440f820a497bd3f9ad0b3a85a7edc7ec67aa

URL: https://github.com/llvm/llvm-project/commit/9451440f820a497bd3f9ad0b3a85a7edc7ec67aa
DIFF: https://github.com/llvm/llvm-project/commit/9451440f820a497bd3f9ad0b3a85a7edc7ec67aa.diff

LOG: [mlir][docs] Fix pass manager document

The code example for pass manager incorrectly uses nestedFunctionPM
instead of nestedAnyPm for adding CSE and Canonicalize Passes. This diff fixes
it by changing it to nestedAnyPm.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D130110

Added: 
    

Modified: 
    mlir/docs/PassManagement.md

Removed: 
    


################################################################################
diff  --git a/mlir/docs/PassManagement.md b/mlir/docs/PassManagement.md
index 255d1a79163d3..62a873b879a89 100644
--- a/mlir/docs/PassManagement.md
+++ b/mlir/docs/PassManagement.md
@@ -419,8 +419,8 @@ nestedFunctionPM.addPass(std::make_unique<MyFunctionPass>());
 // Nest an op-agnostic pass manager. This will operate on any viable
 // operation, e.g. func.func, spv.func, spv.module, builtin.module, etc.
 OpPassManager &nestedAnyPM = nestedModulePM.nestAny();
-nestedFunctionPM.addPass(createCanonicalizePass());
-nestedFunctionPM.addPass(createCSEPass());
+nestedAnyPM.addPass(createCanonicalizePass());
+nestedAnyPM.addPass(createCSEPass());
 
 // Run the pass manager on the top-level module.
 ModuleOp m = ...;


        


More information about the Mlir-commits mailing list