[Mlir-commits] [mlir] [mlir][SCF] Add support for peeling the first iteration out of the loop (PR #74015)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Dec 11 20:42:52 PST 2023


================
@@ -191,6 +191,23 @@ static void rewriteAffineOpAfterPeeling(RewriterBase &rewriter, ForOp forOp,
   });
 }
 
+static void removeAffineOpInsideFirstIteration(RewriterBase &rewriter,
----------------
yzhang93 wrote:

I've removed this function in the revision because I feel it is not necessary. The `affine.min` can be kept as is in the peeled first iteration. And if it is useless, it normally can be canonicalized away as well as the forOp. The tests also validate this when `--canonicalize` is applied. 

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


More information about the Mlir-commits mailing list