[Mlir-commits] [mlir] Introduce new Unroll And Jam loop transform for SCF/Affine loops (PR #94142)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Fri Jun 21 01:56:54 PDT 2024
================
@@ -287,6 +293,25 @@ static Value ceilDivPositive(OpBuilder &builder, Location loc, Value dividend,
return builder.create<arith::DivUIOp>(loc, sum, divisor);
}
+// Returns the trip count of `forOp` if its' low bound, high bound and step are
+// constants, or optional otherwise. Trip count is computed as ceilDiv(highBound
+// - lowBound, step).
+static std::optional<int64_t> getConstantTripCount(scf::ForOp forOp) {
----------------
ftynse wrote:
Nit
```suggestion
/// Returns the trip count of `forOp` if its' low bound, high bound and step are
/// constants, or optional otherwise. Trip count is computed as ceilDiv(highBound
/// - lowBound, step).
static std::optional<int64_t> getConstantTripCount(scf::ForOp forOp) {
```
https://github.com/llvm/llvm-project/pull/94142
More information about the Mlir-commits
mailing list