[Mlir-commits] [mlir] [mlir][Transforms][NFC] Remove `InlineBlockRewrite` (PR #83262)
Jacques Pienaar
llvmlistbot at llvm.org
Thu Feb 29 05:26:48 PST 2024
================
@@ -1649,10 +1598,18 @@ void ConversionPatternRewriter::inlineBlockBefore(Block *source, Block *dest,
"expected 'source' to have no predecessors");
#endif // NDEBUG
- impl->notifyBlockBeingInlined(dest, source, before);
+ // Replace all uses of block arguments.
+ // TODO: Support `replaceAllUsesWith` in the dialect conversion. Then this
+ // function no longer has to be overridden and can be turned into a
+ // non-virtual function.
for (auto it : llvm::zip(source->getArguments(), argValues))
replaceUsesOfBlockArgument(std::get<0>(it), std::get<1>(it));
- dest->getOperations().splice(before, source->getOperations());
+
+ // Move op by op.
----------------
jpienaar wrote:
Could this be avoided in the case where there is no listener?
https://github.com/llvm/llvm-project/pull/83262
More information about the Mlir-commits
mailing list