[Openmp-commits] [PATCH] D126323: [OpenMP] Extend omp teams to permit nested omp atomic

Joel E. Denny via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue May 24 14:23:24 PDT 2022

jdenny added inline comments.

Comment at: clang/lib/Sema/SemaOpenMP.cpp:4983
+                          CurrentRegion != OMPD_loop &&
+                          !(SemaRef.getLangOpts().OpenMPExtensions &&
+                            CurrentRegion == OMPD_atomic);
ABataev wrote:
> jdenny wrote:
> > ABataev wrote:
> > > Can you add a check for 5.2?
> > This is an extension relative not only to 5.2 and but also to previous versions.  I quoted 5.2 just because it's the most recent.
> > 
> > Given that, I'm not sure why this should check for 5.2.  Am I misunderstanding your request?
> Just looks like it is allowed in 5.2. Am I missing something?
I'm not aware of any change in the 5.2 spec that would permit this.  The text I cited in the review summary does not include atomic in the list of regions "that may be strictly nested inside the teams region":

> distribute regions, including any distribute regions arising from composite constructs,
> parallel regions, including any parallel regions arising from combined constructs, loop
> regions, omp_get_num_teams() regions, and omp_get_team_num() regions are the
> only OpenMP regions that may be strictly nested inside the teams region.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list