aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-offload.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2021-11-26 13:11:16 +0100
committerThomas Schwinge <thomas@codesourcery.com>2021-11-30 12:59:14 +0100
commit365cd5f9ba812c389b404a53d99ab5dded5097f4 (patch)
treed8f1575a59ad6b41b6ec86307464f3b45493efd9 /gcc/omp-offload.c
parent77d24d43644909852998043335b5a0e09d1e8f02 (diff)
downloadgcc-365cd5f9ba812c389b404a53d99ab5dded5097f4.zip
gcc-365cd5f9ba812c389b404a53d99ab5dded5097f4.tar.gz
gcc-365cd5f9ba812c389b404a53d99ab5dded5097f4.tar.bz2
[OpenACC] Remove erroneous "Orphan reductions cannot have gang partitioning" handling
That is: -/* Ensure that the middle end does not assign gang level parallelism - to orphan loop containing reductions. */ +/* Verify that we diagnose "gang reduction on an orphan loop" for automatically + assigned gang level of parallelism. */ ... to implement what the OpenACC specification actually says. Fix-up for preceding commit 2b7dac2c0dcb087da9e4018943c023c0678234a3 "Make OpenACC orphan gang reductions errors". gcc/ * omp-offload.c (oacc_loop_auto_partitions): Remove erroneous "Orphan reductions cannot have gang partitioning" handling. gcc/testsuite/ * c-c++-common/goacc/nested-reductions-1-routine.c: Adjust. * c-c++-common/goacc/nested-reductions-2-routine.c: Adjust. * c-c++-common/goacc/orphan-reductions-2.c: Adjust. * gfortran.dg/goacc/nested-reductions-1-routine.f90: Adjust. * gfortran.dg/goacc/nested-reductions-2-routine.f90: Adjust. * gfortran.dg/goacc/orphan-reductions-1.f90: Adjust. * gfortran.dg/goacc/orphan-reductions-2.f90: Adjust.
Diffstat (limited to 'gcc/omp-offload.c')
-rw-r--r--gcc/omp-offload.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c
index 5110a42..5cdb57d 100644
--- a/gcc/omp-offload.c
+++ b/gcc/omp-offload.c
@@ -1623,13 +1623,6 @@ oacc_loop_auto_partitions (oacc_loop *loop, unsigned outer_mask,
non-innermost available level. */
unsigned this_mask = GOMP_DIM_MASK (GOMP_DIM_GANG);
- /* Orphan reductions cannot have gang partitioning. */
- if ((loop->flags & OLF_REDUCTION)
- && oacc_get_fn_attrib (current_function_decl)
- && !lookup_attribute ("omp target entrypoint",
- DECL_ATTRIBUTES (current_function_decl)))
- this_mask = GOMP_DIM_MASK (GOMP_DIM_WORKER);
-
/* Find the first outermost available partition. */
while (this_mask <= outer_mask)
this_mask <<= 1;