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

Jeremy Kun via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jun 23 13:00:42 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.
----------------
j2kun wrote:

I am no C++ whiz but this unusual. Perhaps the comment could be expanded to explain why this is needed?

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


More information about the llvm-branch-commits mailing list