[Mlir-commits] [mlir] [mlir][affine] Use value bound inference to determine minimum/maximum trip counts in loop analysis (PR #128113)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Tue Apr 8 09:18:58 PDT 2025


================
@@ -160,7 +162,8 @@ LogicalResult mlir::affine::promoteIfSingleIteration(AffineForOp forOp) {
   forOp.getBody()->back().erase();
   parentBlock->getOperations().splice(Block::iterator(forOp),
                                       forOp.getBody()->getOperations());
-  forOp.erase();
+  IRRewriter b(forOp.getContext());
+  b.eraseOp(forOp);
----------------
ftynse wrote:

There's no point in making this change. If you want to make this function compatible with rewriters, it should accept a `RewriterBase &` as argument and use that pervasively. In any case, this is irrelevant to the current commit.

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


More information about the Mlir-commits mailing list