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

Arnamoy B via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 8 05:57:34 PDT 2021


arnamoy10 added inline comments.


================
Comment at: flang/lib/Semantics/check-omp-structure.h:82
+        Directive::OMPD_atomic, Directive::OMPD_master} |
+    taskGeneratingSet | parallelSet | doSet};
 static OmpClauseSet privateSet{
----------------
kiranchandramohan wrote:
> Barriers are allowed in a parallel region. It is probably not allowed in parallel do, do simd etc.
Thanks, addressed.


================
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
----------------
kiranchandramohan wrote:
> This is wrong.
Thanks, updated


================
Comment at: flang/test/Semantics/omp-nested-barrier.f90:110
+  do i = 1, 10
+    !$omp distribute
+    do k =1, 10
----------------
kiranchandramohan wrote:
> 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"
Thanks, they are currently shown.


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

https://reviews.llvm.org/D99888



More information about the llvm-commits mailing list