diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2019-11-01 07:59:23 +0000 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2019-11-01 08:59:23 +0100 |
commit | 92e63bd2dfefb2d27bc235523bec6740bba512c2 (patch) | |
tree | 67d9cd0a57317909a139256fdb8379003b5f67b8 /gcc/langhooks-def.h | |
parent | 271da732841345d3834cf458d47f8242ac5ef513 (diff) | |
download | gcc-92e63bd2dfefb2d27bc235523bec6740bba512c2.zip gcc-92e63bd2dfefb2d27bc235523bec6740bba512c2.tar.gz gcc-92e63bd2dfefb2d27bc235523bec6740bba512c2.tar.bz2 |
OpenMP] use_device_addr/use_device_ptr with Fortran allocatable/pointer arrays
gcc/fortran/
* f95-lang.c (LANG_HOOKS_OMP_ARRAY_DATA): Set to gfc_omp_array_data.
* trans-array.c (gfc_conv_descriptor_data_get): Handle also
REFERENCE_TYPE.
* trans-openmp.c (gfc_omp_array_data): New.
* trans.h (gfc_omp_array_data): New prototype.
gcc/
* hooks.c (hook_tree_tree_bool_null): New.
* hooks.h (hook_tree_tree_bool_null): Declare.
* langhooks-def.h (LANG_HOOKS_OMP_ARRAY_DATA): Define.
(LANG_HOOKS_DECLS): Add it.
* langhooks.h (lang_hooks_for_decls): Add omp_array_data.
* omp-low.c (install_var_field): New mode for Fortran descriptor arrays.
(lower_omp_target): Handle Fortran array with descriptor in
OMP_CLAUSE_USE_DEVICE_ADDR/OMP_CLAUSE_USE_DEVICE_PTR.
libgomp/
* testsuite/libgomp.fortran/use_device_addr-1.f90 (test_nullptr_1,
test_dummy_opt_nullptr_callee_1): Add present but unallocated test.
* testsuite/libgomp.fortran/use_device_addr-2.f90: Likewise.
* testsuite/libgomp.fortran/use_device_addr-3.f90: New.
* testsuite/libgomp.fortran/use_device_addr-4.f90: New.
* testsuite/testsuite/libgomp.fortran/use_device_ptr-1.f90: New.
From-SVN: r277705
Diffstat (limited to 'gcc/langhooks-def.h')
-rw-r--r-- | gcc/langhooks-def.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h index 54f80e5..2d3ad9a 100644 --- a/gcc/langhooks-def.h +++ b/gcc/langhooks-def.h @@ -239,6 +239,7 @@ extern tree lhd_unit_size_without_reusable_padding (tree); #define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL lhd_warn_unused_global_decl #define LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS NULL #define LANG_HOOKS_DECL_OK_FOR_SIBCALL lhd_decl_ok_for_sibcall +#define LANG_HOOKS_OMP_ARRAY_DATA hook_tree_tree_bool_null #define LANG_HOOKS_OMP_IS_ALLOCATABLE_OR_PTR hook_bool_const_tree_false #define LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT hook_bool_const_tree_false #define LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE hook_bool_const_tree_false @@ -266,6 +267,7 @@ extern tree lhd_unit_size_without_reusable_padding (tree); LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, \ LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS, \ LANG_HOOKS_DECL_OK_FOR_SIBCALL, \ + LANG_HOOKS_OMP_ARRAY_DATA, \ LANG_HOOKS_OMP_IS_ALLOCATABLE_OR_PTR, \ LANG_HOOKS_OMP_IS_OPTIONAL_ARGUMENT, \ LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE, \ |