| Issue |
52916
|
| Summary |
Create `TraitPass<T>` and `InterfacePass<T>` to mirror `OperationPass<T>`
|
| Labels |
mlir:core
|
| Assignees |
|
| Reporter |
stellaraccident
|
The `OperationPass<T>` template/base class is useful for a few reasons for defining passes which have to operate on a specific operation:
* It internally checks that the operation is of the given type, providing a good error if not.
* As documentation, it signals the constraint to callers so that it is obvious how to setup a nested pass manager.
* When using implicit nesting, it will nest automatically.
The first two characteristics would also be useful for other constrained passes which must operate on operations with a given trait or interface. Propose adding `TraitPass<T>` and `InterfacePass<T>` to capture this. In-tree, the LinalgDetensorize pass would benefit from the first.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs