[flang-commits] [flang] [flang][OpenMP] Implement collapse for imperfectly nested loops (PR #202435)
Krzysztof Parzyszek via flang-commits
flang-commits at lists.llvm.org
Wed Jun 17 05:59:10 PDT 2026
================
@@ -326,6 +369,13 @@ void OmpStructureChecker::CheckNestedConstruct(
// Check requirements on nest depth.
auto [needDepth, needPerfect]{
GetAffectedNestDepthWithReason(beginSpec, version)};
+
+ // In OpenMP 5.2+, perfect nesting is only required for doacross loop
----------------
kparzysz wrote:
I believe the restrictions are as follows:
- 5.0: loop nest with an **ordered** clause must be a perfect nest
- 5.1: loop nest with an **ordered** clause must be a perfect nest if the **ordered** clause has an explicit argument
- 5.2: same as 5.1
- 6.0: loop nest with an **ordered** clause must be a perfect nest if the body contains an **ordered** directive with a **doacross** clause.
https://github.com/llvm/llvm-project/pull/202435
More information about the flang-commits
mailing list