[Mlir-commits] [mlir] [mlir][scf] Expose isPerfectlyNestedForLoops (PR #152115)
Mehdi Amini
llvmlistbot at llvm.org
Mon Aug 25 07:19:26 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);
+
----------------
joker-eph wrote:
Left-over?
https://github.com/llvm/llvm-project/pull/152115
More information about the Mlir-commits
mailing list