diff options
author | Alex Zinenko <zinenko@google.com> | 2023-01-25 16:53:25 +0000 |
---|---|---|
committer | Alex Zinenko <zinenko@google.com> | 2023-01-31 14:21:28 +0000 |
commit | b9e40cde3b35c64f0e4f2156224a671104e04efd (patch) | |
tree | c7f66958e9aff1a80fbccd72b1addf0aea6c2525 /mlir/docs | |
parent | a51ad873bfc9f3ccf7971efce4c5f0a543ee3d5a (diff) | |
download | llvm-b9e40cde3b35c64f0e4f2156224a671104e04efd.tar.gz |
[mlir] multi-argument binding for top-level transform ops
`applyTransforms` now takes an optional mapping to be associated with
trailing block arguments of the top-level transform op, in addition to
the payload root. This allows for more advanced forms of communication
between C++ code and the transform dialect interpreter, in particular
supplying operations without having to re-match them during
interpretation.
Reviewed By: shabalin
Differential Revision: https://reviews.llvm.org/D142559
Diffstat (limited to 'mlir/docs')
-rw-r--r-- | mlir/docs/Dialects/Transform.md | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mlir/docs/Dialects/Transform.md b/mlir/docs/Dialects/Transform.md index eb86bdca5c2a..e73bb79283f2 100644 --- a/mlir/docs/Dialects/Transform.md +++ b/mlir/docs/Dialects/Transform.md @@ -109,13 +109,19 @@ A program transformation expressed using the Transform dialect can be programmatically triggered by calling: ```c++ -LogicalResult transform::applyTransforms(Operation *payloadRoot, - TransformOpInterface transform, - const TransformOptions &options); +LogicalResult transform::applyTransforms( + Operation *payloadRoot, + ArrayRef<ArrayRef<PointerUnion<Operation *, Attribute>> extraMappings, + TransformOpInterface transform, + const TransformOptions &options); ``` that applies the transformations specified by the top-level `transform` to -payload IR contained in `payloadRoot`. +payload IR contained in `payloadRoot`. The payload root operation will be +associated with the first argument of the entry block of the top-level transform +op. This block may have additional arguments, handles or parameters. They will +be associated with values provided as `extraMappings`. The call will report an +error and return if the wrong number of mappings is provided. ## Dialect Extension Mechanism |