[Mlir-commits] [mlir] [mlir][Transforms][NFC] Store per-pattern IR modifications in separate state (PR #145319)

Matthias Springer llvmlistbot at llvm.org
Mon Jun 23 23:53:23 PDT 2025


================
@@ -2131,6 +2150,15 @@ OperationLegalizer::legalize(Operation *op,
   return failure();
 }
 
+/// Helper function that moves and returns the given object. Also resets the
+/// original object, so that it is in a valid, empty state again.
----------------
matthias-springer wrote:

Moving an object leaves it in an unspecified state. This helper function both moves the object and initialized the old object, so that it can be immediately reused again.

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


More information about the Mlir-commits mailing list