Skip to content

[mlir][scf] Fix doc on emitNormalizedLoopBounds, NFC #98372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

ubfx
Copy link
Member

@ubfx ubfx commented Jul 10, 2024

Fix an old comment that doesn't match the function anymore.

Fix an old comment that doesn't match the function anymore.
@llvmbot
Copy link
Member

llvmbot commented Jul 10, 2024

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-scf

Author: Felix Schneider (ubfx)

Changes

Fix an old comment that doesn't match the function anymore.


Full diff: https://github.com/llvm/llvm-project/pull/98372.diff

1 Files Affected:

  • (modified) mlir/include/mlir/Dialect/SCF/Utils/Utils.h (+2-9)
diff --git a/mlir/include/mlir/Dialect/SCF/Utils/Utils.h b/mlir/include/mlir/Dialect/SCF/Utils/Utils.h
index de807c3e4e1f8..b7d6e99b5fdcc 100644
--- a/mlir/include/mlir/Dialect/SCF/Utils/Utils.h
+++ b/mlir/include/mlir/Dialect/SCF/Utils/Utils.h
@@ -127,15 +127,8 @@ LogicalResult loopUnrollByFactor(
 /// for operations with results are not supported.
 LogicalResult loopUnrollJamByFactor(scf::ForOp forOp, uint64_t unrollFactor);
 
-/// Transform a loop with a strictly positive step
-///   for %i = %lb to %ub step %s
-/// into a 0-based loop with step 1
-///   for %ii = 0 to ceildiv(%ub - %lb, %s) step 1 {
-///     %i = %ii * %s + %lb
-/// Insert the induction variable remapping in the body of `inner`, which is
-/// expected to be either `loop` or another loop perfectly nested under `loop`.
-/// Insert the definition of new bounds immediate before `outer`, which is
-/// expected to be either `loop` or its parent in the loop nest.
+/// Materialize bounds and step of a zero-based and unit-step loop derived by
+/// normalizing the specified bounds and step.
 Range emitNormalizedLoopBounds(RewriterBase &rewriter, Location loc,
                                OpFoldResult lb, OpFoldResult ub,
                                OpFoldResult step);

@ubfx ubfx changed the title [mlir][scf] Fix doc on emitNormalizedLoopBounds [mlir][scf] Fix doc on emitNormalizedLoopBounds, NFC Jul 10, 2024
@ubfx ubfx merged commit 7eae9bb into llvm:main Jul 11, 2024
10 checks passed
@ubfx ubfx deleted the doc-normalized-loop-bounds branch July 11, 2024 05:45
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
Fix an old comment that doesn't match the function anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants