[Mlir-commits] [mlir] [mlir] notify insertion of parent op first when cloning (PR #73806)

Slava Zakharin llvmlistbot at llvm.org
Wed Nov 29 13:47:51 PST 2023


================
@@ -527,6 +527,7 @@ LogicalResult OpBuilder::tryFold(Operation *op,
 
 Operation *OpBuilder::clone(Operation &op, IRMapping &mapper) {
   Operation *newOp = op.clone(mapper);
+  newOp = insert(newOp);
----------------
vzakhari wrote:

If we notify about the parent before notifying about the children, then can a pattern convertor transform the parent before we notify about the children?  If yes, then will we have problems with pattern convertors that, for example, erase the children, and then the notification about the erased children happens?

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


More information about the Mlir-commits mailing list