[mlir] optionally allow repeated handles in transform dialect
authorAlex Zinenko <zinenko@google.com>
Thu, 15 Dec 2022 18:48:09 +0000 (18:48 +0000)
committerAlex Zinenko <zinenko@google.com>
Mon, 19 Dec 2022 09:02:03 +0000 (09:02 +0000)
commit4299be1a087edc434fd0111a3316931d7ebc0638
tree1d2e872178c1e6b79586b158959c1938a5a4e64a
parent58e9cc13e24f668a33abdae201d59a02e10c22c0
[mlir] optionally allow repeated handles in transform dialect

Some operations may be able to deal with handles pointing to the same
operation when the handle is consumed. For example, merge handles with
deduplication doesn't actually destroy payload operations and is
specifically intended to remove the situation with duplicates. Add a
method to the transform interface to allow ops to declare they can
support repeated handles.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D140124
mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.td
mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
mlir/lib/Dialect/Transform/IR/TransformOps.cpp
mlir/test/Dialect/Transform/expensive-checks.mlir