llvm-project/mlir/unittests/Pass
River Riddle 9c9a431735 [mlir][Pass] Add support for an InterfacePass and pass filtering based on OperationName
This commit adds a new hook Pass `bool canScheduleOn(RegisteredOperationName)` that
indicates if the given pass can be scheduled on operations of the given type. This makes it
easier to define constraints on generic passes without a) adding conditional checks to
the beginning of the `runOnOperation`, or b) defining a new pass type that forwards
from `runOnOperation` (after checking the invariants) to a new hook. This new hook is
used to implement an `InterfacePass` pass class, that represents a  generic pass that
runs on operations of the given interface type.

The PassManager will also verify that passes added to a pass manager can actually be
scheduled on that pass manager, meaning that we will properly error when an Interface
is scheduled on an operation that doesn't actually implement that interface.

Differential Revision: https://reviews.llvm.org/D120791
2022-03-04 15:14:04 -08:00
..
AnalysisManagerTest.cpp Replace OwningModuleRef with OwningOpRef<ModuleOp> 2022-01-30 14:07:10 -08:00
CMakeLists.txt [mlir] Add a parsePassPipeline overload that returns a new pass manager 2022-01-12 14:54:30 -08:00
PassManagerTest.cpp [mlir][Pass] Add support for an InterfacePass and pass filtering based on OperationName 2022-03-04 15:14:04 -08:00
PassPipelineParserTest.cpp [mlir] Add a parsePassPipeline overload that returns a new pass manager 2022-01-12 14:54:30 -08:00