diff options
author | Matthias Springer <me@m-sp.org> | 2024-11-14 10:27:58 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-14 10:27:58 +0900 |
commit | aed4356252df2a4ab2e430d77a29bdb3dfd874fc (patch) | |
tree | 1a276e760bd3f9eba8b77e2c6515169b526facb8 /llvm/unittests/CGData/StableFunctionMapTest.cpp | |
parent | e5092c301959b599ffd51b7942a8bed5c4be54de (diff) | |
download | llvm-aed4356252df2a4ab2e430d77a29bdb3dfd874fc.zip llvm-aed4356252df2a4ab2e430d77a29bdb3dfd874fc.tar.gz llvm-aed4356252df2a4ab2e430d77a29bdb3dfd874fc.tar.bz2 |
[mlir][Transforms] Dialect Conversion: Add `replaceOpWithMultiple` (#115816)
This commit adds a new function
`ConversionPatternRewriter::replaceOpWithMultiple`. This function is
similar to `replaceOp`, but it accepts multiple `ValueRange`
replacements, one per op result.
Note: This function is not an overload of `replaceOp` because of
ambiguous overload resolution that would make the API difficult to use.
This commit aligns "block signature conversions" with "op replacements":
both support 1:N replacements now. Due to incomplete 1:N support in the
dialect conversion driver, an argument materialization is inserted when
an SSA value is replaced with multiple values; same as block signature
conversions already work around the problem. These argument
materializations are going to be removed in a subsequent commit that
adds full 1:N support. The purpose of this PR is to add missing features
gradually in small increments.
This commit also updates two MLIR transformations that have their custom
workarounds around missing 1:N support. These can already start using
`replaceOpWithMultiple`.
Co-authored-by: Markus Böck <markus.boeck02@gmail.com>
Diffstat (limited to 'llvm/unittests/CGData/StableFunctionMapTest.cpp')
0 files changed, 0 insertions, 0 deletions