Use "oacc kernels" attribute for OpenACC kernels
authorThomas Schwinge <thomas@codesourcery.com>
Fri, 12 May 2017 09:02:55 +0000 (11:02 +0200)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Fri, 12 May 2017 09:02:55 +0000 (11:02 +0200)
commit25651634436238d505c586fd308cdd5b6c5db8f9
tree7fddfeb04f28bb8f5eb26dde13c784b149b14de3
parentee58b02f1160548513a3d00a04acbad93c423b3f
Use "oacc kernels" attribute for OpenACC kernels

gcc/
* omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
Set "oacc kernels" attribute.
* omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
parameter.  Adjust all users.
(oacc_fn_attrib_kernels_p): Remove function.
* omp-offload.c (execute_oacc_device_lower): Look for "oacc
kernels" attribute instead of calling oacc_fn_attrib_kernels_p.
* tree-ssa-loop.c (gate_oacc_kernels): Likewise.
* tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
assert "oacc kernels" attribute is set.
gcc/testsuite/
* c-c++-common/goacc/classify-kernels-unparallelized.c: Adjust.
* c-c++-common/goacc/classify-kernels.c: Likewise.
* c-c++-common/goacc/classify-parallel.c: Likewise.
* c-c++-common/goacc/classify-routine.c: Likewise.
* gfortran.dg/goacc/classify-kernels-unparallelized.f95: Likewise.
* gfortran.dg/goacc/classify-kernels.f95: Likewise.
* gfortran.dg/goacc/classify-parallel.f95: Likewise.
* gfortran.dg/goacc/classify-routine.f95: Likewise.

From-SVN: r247955
16 files changed:
gcc/ChangeLog
gcc/omp-expand.c
gcc/omp-general.c
gcc/omp-general.h
gcc/omp-offload.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/goacc/classify-kernels-unparallelized.c
gcc/testsuite/c-c++-common/goacc/classify-kernels.c
gcc/testsuite/c-c++-common/goacc/classify-parallel.c
gcc/testsuite/c-c++-common/goacc/classify-routine.c
gcc/testsuite/gfortran.dg/goacc/classify-kernels-unparallelized.f95
gcc/testsuite/gfortran.dg/goacc/classify-kernels.f95
gcc/testsuite/gfortran.dg/goacc/classify-parallel.f95
gcc/testsuite/gfortran.dg/goacc/classify-routine.f95
gcc/tree-parloops.c
gcc/tree-ssa-loop.c