[mlir][transform] Add region to ApplyPatternsOp
authorMatthias Springer <me@m-sp.org>
Tue, 6 Jun 2023 07:07:22 +0000 (09:07 +0200)
committerMatthias Springer <me@m-sp.org>
Tue, 6 Jun 2023 07:09:41 +0000 (09:09 +0200)
commit5a10f207cc3714195281b6db11ec3f0fe9110228
treebb98d71aec93a0663c8e3ed4b692a900961ab9fa
parent72756375051648818effd958d4804345f62701d3
[mlir][transform] Add region to ApplyPatternsOp

Patterns should be selected by adding ops that implement `PatternDescriptorOpInterface` to the region of `apply_pattern` ops. Such ops can have operands, allowing for pattern parameterization. The existing way of selecting patterns from the PatternRegistry is deprecated.

Differential Revision: https://reviews.llvm.org/D152167
mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.td
mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
mlir/lib/Dialect/Transform/IR/TransformDialect.cpp
mlir/lib/Dialect/Transform/IR/TransformOps.cpp
mlir/test/Dialect/Transform/ops-invalid.mlir
mlir/test/Dialect/Transform/test-pattern-application.mlir
mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
mlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td