[PATCH] D100228: [flang][OpenMP] Add semantic check for close nesting of `master` regions

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 10 03:19:04 PDT 2021


kiranchandramohan requested changes to this revision.
kiranchandramohan added inline comments.
This revision now requires changes to proceed.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:371
     CheckIfDoOrderedClause(beginDir);
+    CheckMasterNesting(x);
+  }
----------------
Nit: Can we check whether it is the master construct before calling the check function?


================
Comment at: flang/lib/Semantics/check-omp-structure.h:79
     Directive::OMPD_taskloop};
+static OmpDirectiveSet nestedMasterErrSet{
+    OmpDirectiveSet{Directive::OMPD_atomic} | taskGeneratingSet | parallelSet |
----------------
Not for this patch. It will be good to generate these Sets from the OMP.td file.


================
Comment at: flang/lib/Semantics/check-omp-structure.h:80
+static OmpDirectiveSet nestedMasterErrSet{
+    OmpDirectiveSet{Directive::OMPD_atomic} | taskGeneratingSet | parallelSet |
+    doSet};
----------------
Why is parallelSet here? Master is allowed inside parallel.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100228/new/

https://reviews.llvm.org/D100228



More information about the llvm-commits mailing list