[flang-commits] [flang] [Flang][OpenMP] Add semantic support for Loop Sequences and OpenMP loop fuse (PR #161213)

Krzysztof Parzyszek via flang-commits flang-commits at lists.llvm.org
Tue Oct 28 10:13:25 PDT 2025


================
@@ -452,6 +456,65 @@ void OmpStructureChecker::CheckDistLinear(
   }
 }
 
+void OmpStructureChecker::CheckLooprangeBounds(
+    const parser::OpenMPLoopConstruct &x) {
+  const parser::OmpClauseList &clauseList = x.BeginDir().Clauses();
+  if (!clauseList.v.empty()) {
+    for (auto &clause : clauseList.v) {
+      if (const auto *lrClause{
+              std::get_if<parser::OmpClause::Looprange>(&clause.u)}) {
+        if (const auto first{GetIntValue(std::get<0>((lrClause->v).t))}) {
+          if (const auto count{GetIntValue(std::get<1>((lrClause->v).t))}) {
----------------
kparzysz wrote:

Early exits/continues please...

```
auto first{...};
auto count{...};
if (!first || !count) {
  continue;
}
```

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


More information about the flang-commits mailing list