[Mlir-commits] [mlir] [mlir] Allow unroll & jam on SCF loops with results (PR #98887)
Javier Setoain
llvmlistbot at llvm.org
Mon Jul 15 14:10:03 PDT 2024
================
@@ -486,12 +486,15 @@ LogicalResult mlir::loopUnrollByFactor(
}
/// Check if bounds of all inner loops are defined outside of `forOp`
-/// and return false if not.
+/// or defined by constants, and return false if not.
static bool areInnerBoundsInvariant(scf::ForOp forOp) {
auto walkResult = forOp.walk([&](scf::ForOp innerForOp) {
- if (!forOp.isDefinedOutsideOfLoop(innerForOp.getLowerBound()) ||
- !forOp.isDefinedOutsideOfLoop(innerForOp.getUpperBound()) ||
- !forOp.isDefinedOutsideOfLoop(innerForOp.getStep()))
+ if (!(forOp.isDefinedOutsideOfLoop(innerForOp.getLowerBound()) ||
----------------
jsetoain wrote:
Something like this?
https://github.com/llvm/llvm-project/pull/98887
More information about the Mlir-commits
mailing list