[Mlir-commits] [mlir] [mlir] Allow unroll & jam on SCF loops with results (PR #98887)

Aviad Cohen llvmlistbot at llvm.org
Mon Jul 22 00:59:03 PDT 2024


================
@@ -500,6 +503,8 @@ static bool areInnerBoundsInvariant(scf::ForOp forOp) {
 }
 
 /// Unrolls and jams this loop by the specified factor.
+/// This function doesn't verify that the loop is parallel, if there are true
+/// loop carried dependencies, this function will produce invalid code.
 LogicalResult mlir::loopUnrollJamByFactor(scf::ForOp forOp,
----------------
AviadCo wrote:

I see that in affine there is handling for `iter_args`  - please look at https://github.com/llvm/llvm-project/blob/12762b8648d88e6823aedc82f663a596fa2eef76/mlir/lib/Dialect/Affine/Utils/LoopUtils.cpp#L1134

The handling is for reductions there but still it is a case we can address / block

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


More information about the Mlir-commits mailing list