[mlir] Transform dialect: add named sequences
authorAlex Zinenko <zinenko@google.com>
Mon, 20 Mar 2023 16:18:35 +0000 (16:18 +0000)
committerAlex Zinenko <zinenko@google.com>
Tue, 21 Mar 2023 14:53:54 +0000 (14:53 +0000)
commitfb409a2822df90e3c63d5e674966f18c8638cdaf
tree4b6670d6bfcdc31a012a6096777408d2bf48d8ab
parent270a6a2824e3b42bd87acc986732a8b8f0765be7
[mlir] Transform dialect: add named sequences

Named sequences introduce an additional abstraction and reuse capability
to the transform dialect. They can be though of as macros parameterized
with handles that can be invoked in places where a transform dialect
operation is expected. Such reuse was previously not possible in the
dialect and required dynamic construction of the transform IR from the
client language. Named sequences are intentionally restricted to
disallow recursion, as it could make the dialect accidentally
Turing-complete, which isn't desired at this point.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D146433
mlir/include/mlir/Dialect/Transform/IR/TransformDialect.td
mlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
mlir/include/mlir/Dialect/Transform/IR/TransformOps.h
mlir/include/mlir/Dialect/Transform/IR/TransformOps.td
mlir/lib/Dialect/Transform/IR/TransformDialect.cpp
mlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
mlir/lib/Dialect/Transform/IR/TransformOps.cpp
mlir/lib/Dialect/Transform/Transforms/TransformInterpreterPassBase.cpp
mlir/test/Dialect/Transform/ops-invalid.mlir
mlir/test/Dialect/Transform/test-interpreter.mlir
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel