https://github.com/Meinersbur commented:

I think we need more tests:

Diagnostics output
 * Diagnostics when applied to a non-perfectly nested loop
 * depth argument diagnostics: `0`, `-1`, insufficient number of loops
 * depth argument is not a constant

Codegen/execution
 * When applied to a non-rectangular loop
 * Applied to the generated loops of other constructs: fuse, reverse, unroll, 
etc
 * Other loop-associated constructs applied to it, e.g. flatten+for, 
flatten+unroll, etc.
 * Applied onto itself: flatten + flatten ≈ flatten depth(3)
 * depth argument is a template parameter
 * Degenerate loop: `for (int i = 0; i < -1; ++i)`

Optional: A warning diagnostic if `depth` is omitted (so the default of 2 
applies), but there are 3 or more loops that could be flattened

https://github.com/llvm/llvm-project/pull/206977
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to