[Mlir-commits] [mlir] [mlir] Add splitForOpAtBound utility and use it in loop unrolling (PR #215108)
Matthias Springer
llvmlistbot at llvm.org
Fri Aug 14 06:34:26 PDT 2026
================
@@ -108,6 +108,16 @@ struct UnrolledLoopInfo {
std::optional<scf::ForOp> epilogueLoopOp = std::nullopt;
};
+/// Splits `forOp` into two consecutive loops at `splitPoint`:
+/// first: [lowerBound, splitPoint)
+/// second: [splitPoint, upperBound)
+///
+/// Reuses `forOp` as the first loop and clones a second loop. Returns the
+/// second loop. When all bounds are constant, fails unless splitPoint is within
----------------
matthias-springer wrote:
What happens if `upperBound != lowerBound + step * k`? Would that be a valid split?
https://github.com/llvm/llvm-project/pull/215108
More information about the Mlir-commits
mailing list