[Mlir-commits] [mlir] [MLIR][Affine] Fix signature of mlir::affine::permuteLoops (PR #111100)
Uday Bondhugula
llvmlistbot at llvm.org
Tue Nov 5 20:11:31 PST 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();
----------------
bondhugula wrote:
The C-style cast is to work around const'ness friction in MLIR - MLIR IR types don't use `const`s but ArrayRef and similar LLVM data structures will give you `const`.
There's no `AffineForOp` mutation happening here.
https://github.com/llvm/llvm-project/pull/111100
More information about the Mlir-commits
mailing list