[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N support to `replaceUsesOfBlockArgument` (PR #145171)
Matthias Springer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Jun 22 02:43:05 PDT 2025
================
@@ -1434,12 +1439,15 @@ Block *ConversionPatternRewriterImpl::applySignatureConversion(
if (!inputMap) {
// This block argument was dropped and no replacement value was provided.
// Materialize a replacement value "out of thin air".
- buildUnresolvedMaterialization(
- MaterializationKind::Source,
- OpBuilder::InsertPoint(newBlock, newBlock->begin()), origArg.getLoc(),
- /*valuesToMap=*/{origArg}, /*inputs=*/ValueRange(),
- /*outputTypes=*/origArgType, /*originalType=*/Type(), converter);
- appendRewrite<ReplaceBlockArgRewrite>(block, origArg, converter);
----------------
matthias-springer wrote:
No, `buildUnresolvedMaterialization` does that if `valuesToMap` is provided. That's why `valuesToMap` is now empty.
https://github.com/llvm/llvm-project/pull/145171
More information about the llvm-branch-commits
mailing list