[Mlir-commits] [mlir] [mlir][scf] Expose isPerfectlyNestedForLoops (PR #152115)

Shay Kleiman llvmlistbot at llvm.org
Tue Aug 26 00:02:35 PDT 2025


================
@@ -364,6 +364,14 @@ FailureOr<scf::SCFTilingResult>
 tileReductionUsingScf(RewriterBase &b, PartialReductionOpInterface op,
                       ArrayRef<OpFoldResult> tileSizes);
 
+/// Check if the provided loops are perfectly nested for-loops. Perfect nesting
+/// means:
+/// 1. All loops are scf.for operations
+/// 2. Each outer loop's region iter args match the inner loop's init args
+/// 3. Each outer loop's yields match the inner loop's results
+/// 4. Each region iter arg and result has exactly one use
+bool isPerfectlyNestedForLoops(MutableArrayRef<LoopLikeOpInterface> loops);
+
----------------
shay-kl wrote:

yep, removed.

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


More information about the Mlir-commits mailing list