[PATCH] D99888: [flang][OpenMP] Add semantic checks for occurrence of nested Barrier regions

Kiran Chandramohan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 10 06:50:36 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.h:82
+        Directive::OMPD_atomic, Directive::OMPD_master} |
+    taskGeneratingSet | parallelSet | doSet};
 static OmpClauseSet privateSet{
----------------
Barriers are allowed in a parallel region. It is probably not allowed in parallel do, do simd etc.


================
Comment at: flang/test/Semantics/omp-nested-barrier.f90:44
+    k = k + 1
+    !ERROR: `BARRIER` region may not be closely nested inside of `WORKSHARING`, `LOOP`, `TASK`, `TASKLOOP`,`CRITICAL`, `ORDERED`, `ATOMIC` or `MASTER` region.
+    !$omp barrier
----------------
This is wrong.


================
Comment at: flang/test/Semantics/omp-nested-barrier.f90:110
+  do i = 1, 10
+    !$omp distribute
+    do k =1, 10
----------------
This and further tests below that use distribute are going to run into the following restriction when it is implemented.

"The region associated with the distribute construct must be strictly nested inside a teams region"


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

https://reviews.llvm.org/D99888



More information about the llvm-commits mailing list