OpenMP: Cleanups related to the 'present' modifier
Reduce number of enum values passed to libgomp as GOMP_MAP_PRESENT_{TO,TOFROM,FROM,ALLOC} have the same semantic as GOMP_MAP_FORCE_PRESENT (i.e. abort if not present, otherwise ignore); that's different to GOMP_MAP_ALWAYS_PRESENT_{TO,TOFROM,FROM} which also abort if not present but copy data when present. This is is a follow-up to the commit r14-1579-g4ede915d5dde93 done 6 days ago. Additionally, the commit improves a libgomp run-time and a C/C++ compile-time error wording and extends testcases a tiny bit. gcc/c/ChangeLog: * c-parser.cc (c_parser_omp_clause_map): Reword error message for clearness especially with 'omp target (enter/exit) data.' gcc/cp/ChangeLog: * parser.cc (cp_parser_omp_clause_map): Reword error message for clearness especially with 'omp target (enter/exit) data.' * semantics.cc (handle_omp_array_sections): Handle GOMP_MAP_{ALWAYS_,}PRESENT_{TO,TOFROM,FROM,ALLOC} enum values. gcc/ChangeLog: * gimplify.cc (gimplify_adjust_omp_clauses_1): Use GOMP_MAP_FORCE_PRESENT for 'present alloc' implicit mapping. (gimplify_adjust_omp_clauses): Change GOMP_MAP_PRESENT_{TO,TOFROM,FROM,ALLOC} to the equivalent GOMP_MAP_FORCE_PRESENT. * omp-low.cc (lower_omp_target): Remove handling of no-longer valid GOMP_MAP_PRESENT_{TO,TOFROM,FROM,ALLOC}; update map kinds used for to/from clauses with present modifier. include/ChangeLog: * gomp-constants.h (enum gomp_map_kind): Change the enum values GOMP_MAP_PRESENT_{TO,TOFROM,FROM,ALLOC} to be compiler only. (GOMP_MAP_PRESENT_P): Update to include also GOMP_MAP_FORCE_PRESENT. libgomp/ChangeLog: * target.c (gomp_to_device_kind_p, gomp_map_vars_internal): Replace GOMP_MAP_PRESENT_{FROM,TO,TOFROM,ACLLOC} by GOMP_MAP_FORCE_PRESENT. (gomp_map_vars_internal, gomp_update): Likewise; unify and improve error message. * testsuite/libgomp.c-c++-common/target-present-2.c: Update for changed error message. * testsuite/libgomp.fortran/target-present-1.f90: Likewise. * testsuite/libgomp.fortran/target-present-2.f90: Likewise. * testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise. * testsuite/libgomp.c-c++-common/target-present-1.c: Likewise and extend testcase to check that data is copied when needed. * testsuite/libgomp.c-c++-common/target-present-3.c: Likewise. * testsuite/libgomp.fortran/target-present-3.f90: Likewise. gcc/testsuite/ChangeLog: * c-c++-common/gomp/defaultmap-4.c: Update scan-tree-dump. * c-c++-common/gomp/map-9.c: Likewise. * gfortran.dg/gomp/defaultmap-8.f90: Likewise. * gfortran.dg/gomp/map-11.f90: Likewise. * gfortran.dg/gomp/target-update-1.f90: Likewise. * gfortran.dg/gomp/map-12.f90: Likewise; also check original dump. * c-c++-common/gomp/map-6.c: Update dg-error and also check clause error with 'target (enter/exit) data'.
Showing
- gcc/c/c-parser.cc 2 additions, 3 deletionsgcc/c/c-parser.cc
- gcc/cp/parser.cc 2 additions, 3 deletionsgcc/cp/parser.cc
- gcc/cp/semantics.cc 7 additions, 0 deletionsgcc/cp/semantics.cc
- gcc/gimplify.cc 12 additions, 1 deletiongcc/gimplify.cc
- gcc/omp-low.cc 3 additions, 11 deletionsgcc/omp-low.cc
- gcc/testsuite/c-c++-common/gomp/defaultmap-4.c 2 additions, 2 deletionsgcc/testsuite/c-c++-common/gomp/defaultmap-4.c
- gcc/testsuite/c-c++-common/gomp/map-6.c 12 additions, 2 deletionsgcc/testsuite/c-c++-common/gomp/map-6.c
- gcc/testsuite/c-c++-common/gomp/map-9.c 4 additions, 4 deletionsgcc/testsuite/c-c++-common/gomp/map-9.c
- gcc/testsuite/gfortran.dg/gomp/defaultmap-8.f90 2 additions, 2 deletionsgcc/testsuite/gfortran.dg/gomp/defaultmap-8.f90
- gcc/testsuite/gfortran.dg/gomp/map-11.f90 4 additions, 4 deletionsgcc/testsuite/gfortran.dg/gomp/map-11.f90
- gcc/testsuite/gfortran.dg/gomp/map-12.f90 18 additions, 17 deletionsgcc/testsuite/gfortran.dg/gomp/map-12.f90
- gcc/testsuite/gfortran.dg/gomp/target-update-1.f90 1 addition, 1 deletiongcc/testsuite/gfortran.dg/gomp/target-update-1.f90
- include/gomp-constants.h 9 additions, 10 deletionsinclude/gomp-constants.h
- libgomp/target.c 26 additions, 29 deletionslibgomp/target.c
- libgomp/testsuite/libgomp.c-c++-common/target-present-1.c 15 additions, 5 deletionslibgomp/testsuite/libgomp.c-c++-common/target-present-1.c
- libgomp/testsuite/libgomp.c-c++-common/target-present-2.c 1 addition, 1 deletionlibgomp/testsuite/libgomp.c-c++-common/target-present-2.c
- libgomp/testsuite/libgomp.c-c++-common/target-present-3.c 14 additions, 1 deletionlibgomp/testsuite/libgomp.c-c++-common/target-present-3.c
- libgomp/testsuite/libgomp.fortran/target-present-1.f90 1 addition, 1 deletionlibgomp/testsuite/libgomp.fortran/target-present-1.f90
- libgomp/testsuite/libgomp.fortran/target-present-2.f90 1 addition, 1 deletionlibgomp/testsuite/libgomp.fortran/target-present-2.f90
- libgomp/testsuite/libgomp.fortran/target-present-3.f90 16 additions, 3 deletionslibgomp/testsuite/libgomp.fortran/target-present-3.f90
Loading
Please register or sign in to comment