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
// 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 = ...;