[Mlir-commits] [mlir] [mlir][Transforms] Add a utility method to move value definitions. (PR #130874)

Ian Wood llvmlistbot at llvm.org
Tue Mar 11 20:29:26 PDT 2025


================
@@ -1115,3 +1115,72 @@ LogicalResult mlir::moveOperationDependencies(RewriterBase &rewriter,
   DominanceInfo dominance(op);
   return moveOperationDependencies(rewriter, op, insertionPoint, dominance);
 }
+
+LogicalResult mlir::moveValueDefinitions(RewriterBase &rewriter,
+                                         ValueRange values,
+                                         Operation *insertionPoint,
+                                         DominanceInfo &dominance) {
+  // Remove the values that already dominate the insertion point.
+  SmallVector<Value> prunedValues;
+  for (auto value : values) {
----------------
IanWood1 wrote:

Actually, ignore what I said. This can't be as easily split as I thought.

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


More information about the Mlir-commits mailing list