[Mlir-commits] [mlir] [mlir][IR] Send missing notifications when inlining a block (PR #79593)

Jacques Pienaar llvmlistbot at llvm.org
Tue Jan 30 20:25:04 PST 2024


================
@@ -317,7 +317,16 @@ void RewriterBase::inlineBlockBefore(Block *source, Block *dest,
 
   // Move operations from the source block to the dest block and erase the
   // source block.
-  dest->getOperations().splice(before, source->getOperations());
+  if (!listener) {
+    // Fast path: If no listener is attached, move all operations at once.
+    dest->getOperations().splice(before, source->getOperations());
+  } else {
+    while (!source->empty())
----------------
jpienaar wrote:

OOC what is the overhead here vs doing a splice and then invoking notify inserted? (Probably neglible but just checking)

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


More information about the Mlir-commits mailing list