[all-commits] [llvm/llvm-project] 48ca3a: [OpenMP] Extend omp teams to permit nested omp atomic
Joel E. Denny via All-commits
all-commits at lists.llvm.org
Thu May 26 11:59:35 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 48ca3a5ebb156ccb776eea399138b7cda4d13395
https://github.com/llvm/llvm-project/commit/48ca3a5ebb156ccb776eea399138b7cda4d13395
Author: Joel E. Denny <jdenny.ornl at gmail.com>
Date: 2022-05-26 (Thu, 26 May 2022)
Changed paths:
M clang/lib/Sema/SemaOpenMP.cpp
M clang/test/OpenMP/nesting_of_regions.cpp
A openmp/libomptarget/test/offloading/target-teams-atomic.c
A openmp/runtime/test/teams/teams-atomic.c
Log Message:
-----------
[OpenMP] Extend omp teams to permit nested omp atomic
OpenMP 5.2, sec. 10.2 "teams Construct", p. 232, L9-12 restricts what
regions can be strictly nested within a `teams` construct. This patch
relaxes Clang's enforcement of this restriction in the case of nested
`atomic` constructs unless `-fno-openmp-extensions` is specified.
Cases like the following then seem to work fine with no additional
implementation changes:
```
#pragma omp target teams map(tofrom:x)
#pragma omp atomic update
x++;
```
Reviewed By: ABataev
Differential Revision: https://reviews.llvm.org/D126323
More information about the All-commits
mailing list