[Mlir-commits] [mlir] [MLIR][SCF] Fix LoopPeelOp documentation (NFC) (PR #113179)

Andrzej WarzyƄski llvmlistbot at llvm.org
Tue Oct 22 15:19:22 PDT 2024


================
@@ -158,12 +158,12 @@ def LoopPeelOp : Op<Transform_Dialect, "loop.peel",
      This operation ignores non-scf::ForOp ops and drops them in the return.
 
      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.
+     first scf::ForOp corresponds to the target loop, whose lower bound has
+     been updated to the original lower bound plus the step. The second result
+     is the first iteration of the loop which can be canonicalized away in the
+     following optimization.
----------------
banach-space wrote:

To me, the original comment is _almost_ correct ("remaining **iteration**" -> "remaining **iterations**" and "new lower bound is the original lower bound plus **the number of steps**" -> "new lower bound is the original lower bound plus **the step"**). What am I missing?

The newly added paragraph is not clear to me:
> lower bound has been updated to the original lower bound plus the step

Are you sure? The lower bound doesn't change. In general, the lower bound of the "first" loop is equal to the lower bound of the original loop. That's one thing that `peelFront` won't change.

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


More information about the Mlir-commits mailing list