Add a new transform op combinator that implements an "if-then-else"
style of mechanism for applying transformations. Its main purpose is to
serve as a higher-level driver when applying multiple transform scripts
to potentially overlapping pieces of the payload IR. This is similar to
how the various rewrite drivers operate in C++, but at a higher level
and with more declarative expressions. This is not intended to replace
existing pattern-based rewrites, but to to drive more complex
transformations that are exposed in the transform dialect and are too
complex to be expressed as simple declarative rewrites.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Dialect/Transform/IR/MatchInterfaces.td | ||
---|---|---|
10–14 | This should be fixed with D147689. | |
mlir/include/mlir/Dialect/Transform/IR/TransformOps.td | ||
127 | closing parenthesis | |
130 | remove | |
133 | succeeds | |
136 | Is this preorder or postorder? | |
158 | remove | |
165 | an | |
mlir/lib/Dialect/Transform/IR/TransformOps.cpp | ||
505–508 | Could this be done in the op verifier? | |
571–575 | Isn't this already caught by the op verifier/parser? | |
mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp | ||
218 | with |
Address review.
mlir/include/mlir/Dialect/Transform/IR/MatchInterfaces.td | ||
---|---|---|
10–14 | Nice, thanks for fixing! | |
mlir/lib/Dialect/Transform/IR/TransformOps.cpp | ||
505–508 | We actually allow for external symbols in the verifier. During application, we can "resolve" them by inlining definitions from other files, see https://reviews.llvm.org/D146961. If that didn't happen, this will complain. | |
571–575 | This gets called from the trait verifier, which runs before op verifier, so we unfortunately need to duplicate some conditions to avoid hard failures. |
This should be fixed with D147689.