[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
Mon Apr 5 10:33:57 PDT 2021


arnamoy10 added inline comments.


================
Comment at: flang/lib/Semantics/check-omp-structure.cpp:462
+    if (CurrentDirectiveIsNested() &&
+        llvm::omp::nestedBarrierErrSet.test(GetContextParent().directive)) {
+      context_.Say(parser::FindSourceLocation(x),
----------------
kiranchandramohan wrote:
> Definition of closely nested region is 
> "A region nested inside another region with no parallel region nested between them."
> 
> Does this check capture this definition correctly?
Thanks for pointing in out.

1.  Just double checking -- is //parallel region// a region enclosed by the `!$omp parallel` construct?
2. IIUC, [[ https://github.com/llvm/llvm-project/blob/0116d04d04f20e9ae62ba847075840c3cb298080/flang/lib/Semantics/check-omp-structure.cpp#L130 | this ]] check (by which my code was inspired) also does not cover the definition of "close nesting"?  Please confirm.



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99888



More information about the llvm-commits mailing list