OpenACC: Separate enter/exit data ABIs
authorAndrew Stubbs <ams@codesourcery.com>
Fri, 25 Sep 2020 15:22:47 +0000 (16:22 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Thu, 10 Jun 2021 11:37:13 +0000 (13:37 +0200)
commit7aefef31365b9c3d32a0edb6ea0d3b8864d7e91a
treeae2fbfb33c70285282cfb070d9e78e492cc30557
parent7999363961dc6feeb0976cc6d85ea91a120d0e1d
OpenACC: Separate enter/exit data ABIs

Move the OpenACC enter and exit data directives from using a single builtin to
having one each.  For most purposes it was easy to tell which was which, from
the clauses given, but it's overhead we can easily avoid, and there may be
future uses where that isn't possible.

gcc/
* omp-builtins.def (BUILT_IN_GOACC_ENTER_EXIT_DATA): Split into...
(BUILT_IN_GOACC_ENTER_DATA, BUILT_IN_GOACC_EXIT_DATA): ... these.
* gimple.h (enum gf_mask): Split
'GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA' into
'GF_OMP_TARGET_KIND_OACC_ENTER_DATA' and
'GF_OMP_TARGET_KIND_OACC_EXIT_DATA'.
(is_gimple_omp_oacc): Update.
* gimple-pretty-print.c (dump_gimple_omp_target): Likewise.
* gimplify.c (gimplify_omp_target_update): Likewise.
* omp-expand.c (expand_omp_target, build_omp_regions_1)
(omp_make_gimple_edges): Likewise.
* omp-low.c (check_omp_nesting_restrictions, lower_omp_target):
Likewise.
gcc/testsuite/
* c-c++-common/goacc-gomp/nesting-fail-1.c: Adjust patterns.
* c-c++-common/goacc/finalize-1.c: Likewise.
* c-c++-common/goacc/mdc-1.c: Likewise.
* c-c++-common/goacc/nesting-fail-1.c: Likewise.
* c-c++-common/goacc/struct-enter-exit-data-1.c: Likewise.
* gfortran.dg/goacc/attach-descriptor.f90: Likewise.
* gfortran.dg/goacc/finalize-1.f: Likewise.
* gfortran.dg/goacc/mapping-tests-3.f90: Likewise.
libgomp/
* libgomp.map (GOACC_2.0.2): New symbol version.
* libgomp_g.h (GOACC_enter_data, GOACC_exit_data) New prototypes.
* oacc-mem.c (GOACC_enter_data, GOACC_exit_data) New functions.

Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>
17 files changed:
gcc/gimple-pretty-print.c
gcc/gimple.h
gcc/gimplify.c
gcc/omp-builtins.def
gcc/omp-expand.c
gcc/omp-low.c
gcc/testsuite/c-c++-common/goacc-gomp/nesting-fail-1.c
gcc/testsuite/c-c++-common/goacc/finalize-1.c
gcc/testsuite/c-c++-common/goacc/mdc-1.c
gcc/testsuite/c-c++-common/goacc/nesting-fail-1.c
gcc/testsuite/c-c++-common/goacc/struct-enter-exit-data-1.c
gcc/testsuite/gfortran.dg/goacc/attach-descriptor.f90
gcc/testsuite/gfortran.dg/goacc/finalize-1.f
gcc/testsuite/gfortran.dg/goacc/mapping-tests-3.f90
libgomp/libgomp.map
libgomp/libgomp_g.h
libgomp/oacc-mem.c