[Mlir-commits] [mlir] [mlir][xegpu] Fix operand layouts when rematerializing on layout conflict (PR #224730)

Charitha Saumya llvmlistbot at llvm.org
Tue Oct 6 08:48:22 PDT 2026


================
@@ -1652,6 +1652,36 @@ LogicalResult ResolveLayoutConflicts::assignResultLayout(OpResult &result) {
   return success();
 }
 
+// Recursively rematerialize a trivially-rematerializable producer subtree so
+// that the clone yields `layout`. Cloning only the producer would leave its
+// operands pointing at values that carry the original (conflicting) layout,
----------------
charithaintc wrote:

I get that. but this new recursive traversal seems unmercenary. I am concerned about the compile time as well and maintainability. 

Instead I would prefer a while loop over the original traversal and check for a fixed point (i.e. no more new conflicts). This is the standard way to such things. 

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


More information about the Mlir-commits mailing list