[mlir][Pass] Make PassManager default to op-agnostic
authorrkayaith <rkayaith@gmail.com>
Wed, 9 Nov 2022 04:23:28 +0000 (23:23 -0500)
committerRahul Kayaith <rkayaith@gmail.com>
Wed, 25 Jan 2023 20:38:19 +0000 (15:38 -0500)
commit94a309284d722f2cb58c91d878c891cf54039f2e
tree540c671b71253675a37a98eeeed22934f685f0da
parentd1b775d6f561df7c251f38579d3bcf8714904a86
[mlir][Pass] Make PassManager default to op-agnostic

Currently `PassManager` defaults to being anchored on `builtin.module`.
Switching the default makes `PassManager` consistent with
`OpPassManager` and avoids the implicit dependency on `builtin.module`.

Specifying the anchor op type isn't strictly necessary when using
explicit nesting (existing pipelines will continue to work), but I've
updated most call sites to specify the anchor since it allows for better
error-checking during pipeline construction.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D137731
17 files changed:
flang/lib/Frontend/FrontendActions.cpp
flang/tools/bbc/bbc.cpp
flang/tools/tco/tco.cpp
mlir/docs/PassManagement.md
mlir/docs/Tutorials/Toy/Ch-3.md
mlir/examples/toy/Ch3/toyc.cpp
mlir/examples/toy/Ch4/toyc.cpp
mlir/examples/toy/Ch5/toyc.cpp
mlir/examples/toy/Ch6/toyc.cpp
mlir/examples/toy/Ch7/toyc.cpp
mlir/include/mlir/IR/OperationSupport.h
mlir/include/mlir/Pass/PassManager.h
mlir/lib/Pass/Pass.cpp
mlir/lib/Rewrite/FrozenRewritePatternSet.cpp
mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
mlir/unittests/ExecutionEngine/Invoke.cpp
mlir/unittests/Pass/PassManagerTest.cpp