[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N support to `replaceUsesOfBlockArgument` (PR #145171)

Jeremy Kun via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Jun 21 16:16:38 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);
----------------
j2kun wrote:

Was it a bug here that this step did not update `mapping`? (and in this PR now it does via replaceUsesOfBlockArgument)

https://github.com/llvm/llvm-project/pull/145171


More information about the llvm-branch-commits mailing list