[Mlir-commits] [mlir] [MLIR][Affine] Fix signature of mlir::affine::permuteLoops (PR #111100)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Mon Oct 28 14:40:19 PDT 2024


================
@@ -1406,8 +1406,8 @@ unsigned mlir::affine::permuteLoops(MutableArrayRef<AffineForOp> input,
   // Move the innermost loop body to the loop that would be the innermost in the
   // permuted nest (only if the innermost loop is going to change).
   if (permMap.back() != input.size() - 1) {
-    auto *destBody = input[invPermMap.back().second].getBody();
-    auto *srcBody = input.back().getBody();
+    Block *destBody = ((AffineForOp)input[invPermMap.back().second]).getBody();
----------------
ftynse wrote:

It doesn't mutate the _value_ in the array, so `ArrayRef` is fine. Not a fan of C-style casts, but okay.

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


More information about the Mlir-commits mailing list