[Mlir-commits] [mlir] [MLIR][Affine] NFC. Fix/improve debug messages for affine analysis/fusion utils (PR #127164)

Uday Bondhugula llvmlistbot at llvm.org
Fri Feb 14 19:30:26 PST 2025


================
@@ -1804,29 +1804,28 @@ void mlir::affine::getComputationSliceState(
   unsigned pos = isBackwardSlice ? numSrcLoopIVs + loopDepth : loopDepth;
   unsigned num =
       isBackwardSlice ? numDstLoopIVs - loopDepth : numSrcLoopIVs - loopDepth;
-  dependenceConstraints->projectOut(pos, num);
+  FlatAffineValueConstraints sliceCst(dependenceConstraints);
----------------
bondhugula wrote:

Non-trivial inputs have to be passed const reference, not by value. If the method needs a copy of it for temporary working and modification, it should do it itself. The caller shouldn't be bothered/have to think about it. The copy is being created because `sliceCst` is modified later - it's a scratch constraints.

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


More information about the Mlir-commits mailing list