[PATCH] [og8] Add OpenACC 2.6 if and if_present clauses on host_data construct

Gergö Barany gergo@codesourcery.com
Fri Dec 21 12:31:00 GMT 2018


OpenACC 2.6 specifies `if' and `if_present' clauses on the `host_data' 
construct. These patches add support for these clauses. The first patch, 
by Thomas, reorganizes libgomp internals to turn a "device" argument 
into "flags" that can provide more information to the runtime. The 
second patch adds support for the `if' and `if_present' clauses, using 
the new flag mechanism.

OK for openacc-gcc-8-branch?

     gcc/
     * omp-expand.c (expand_omp_target): Restructure OpenACC vs. OpenMP
     code paths.  Update for libgomp OpenACC entry points change.
     include/
     * gomp-constants.h (GOACC_FLAG_HOST_FALLBACK)
     (GOACC_FLAGS_MARSHAL_OP, GOACC_FLAGS_UNMARSHAL): Define.
     libgomp/
     * oacc-parallel.c (GOACC_parallel_keyed, GOACC_parallel)
     (GOACC_data_start, GOACC_enter_exit_data, GOACC_update)
     (GOACC_declare): Redefine the "device" argument to "flags".


     gcc/c/
     * c-parser.c (OACC_HOST_DATA_CLAUSE_MASK): Add PRAGMA_OACC_CLAUSE_IF
     and PRAGMA_OACC_CLAUSE_IF_PRESENT.
     gcc/cp/
     * parser.c (OACC_HOST_DATA_CLAUSE_MASK): Likewise.

     gcc/fortran/
     * openmp.c (OACC_HOST_DATA_CLAUSES): Add OMP_CLAUSE_IF and
     OMP_CLAUSE_IF_PRESENT.

     gcc/
     * omp-expand.c (expand_omp_target): Handle if_present flag on
     OpenACC host_data construct.

     gcc/testsuite/c-c++-common/goacc/
     * host_data-1.c: Add tests of if and if_present clauses on host_data.
     gcc/testsuite/gfortran.dg/goacc/
     * host_data-tree.f95: Likewise.

     include/
     * gomp-constants.h (GOACC_FLAG_HOST_DATA_IF_PRESENT): New constant.

     libgomp/
     * libgomp.h (enum gomp_map_vars_kind): Add
     GOMP_MAP_VARS_OPENACC_IF_PRESENT.

     libgomp/
     * oacc-parallel.c (GOACC_data_start): Handle
     GOACC_FLAG_HOST_DATA_IF_PRESENT flag.
     * target.c (gomp_map_vars_async): Handle
     GOMP_MAP_VARS_OPENACC_IF_PRESENT mapping kind.

     libgomp/testsuite/libgomp.oacc-c-c++-common/
     * host_data-6.c: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-For-libgomp-OpenACC-entry-points-redefine-the-device.patch
Type: text/x-patch
Size: 16959 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20181221/4f139446/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-og8-Add-OpenACC-2.6-if-and-if_present-clauses-on-hos.patch
Type: text/x-patch
Size: 15827 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20181221/4f139446/attachment-0001.bin>


More information about the Gcc-patches mailing list