[Mlir-commits] [mlir] [mlir][SCF] Add support for peeling the first iteration out of the loop (PR #74015)
Lei Zhang
llvmlistbot at llvm.org
Fri Dec 8 22:07:34 PST 2023
================
@@ -118,9 +120,15 @@ def LoopPeelOp : Op<Transform_Dialect, "loop.peel",
This operation ignores non-scf::ForOp ops and drops them in the return.
- This operation returns two scf::ForOp Ops, with the first Op satisfying
- the postcondition: "the loop trip count is divisible by the step". The
- second loop Op contains the remaining iteration. Note that even though the
+ When `peelFront` is true, this operation returns two scf::ForOp Ops, the
+ first scf::ForOp corresponds to the first iteration of the loop which can
+ be canonicalized away in the following optimization. The second loop Op
+ contains the remaining iteration, and the new lower bound is the original
+ lower bound plus the number of steps.
+
+ For the other case, this operation returns two scf::ForOp Ops, with the first
----------------
antiagainst wrote:
I'd suggest to make it explicit here by saying "When `peelFront` is not true".
https://github.com/llvm/llvm-project/pull/74015
More information about the Mlir-commits
mailing list