diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2019-10-30 16:32:38 +0000 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2019-10-30 17:32:38 +0100 |
commit | 91ae0a46fd6bf4669fe251398c3f4f3ebaa7b2ff (patch) | |
tree | 2446475dfa38f4d550198d2fe4b2ee54539f5128 /gcc | |
parent | d03eca30d746a097635d8dedc9e059c6b2f80907 (diff) | |
download | gcc-91ae0a46fd6bf4669fe251398c3f4f3ebaa7b2ff.zip gcc-91ae0a46fd6bf4669fe251398c3f4f3ebaa7b2ff.tar.gz gcc-91ae0a46fd6bf4669fe251398c3f4f3ebaa7b2ff.tar.bz2 |
Fortran/OpenMP] Don't create "alloc:" for 'target exit data'
gcc/
* gimplify.c (gimplify_scan_omp_clauses): Remove FE-generated
GOMP_MAP_TO_PSET and GOMP_MAP_POINTER mapping for 'target update'
and 'target exit data'.
libgomp/
* testsuite/libgomp.fortran/target9.f90: New.
From-SVN: r277631
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/gimplify.c | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0be5eb3..d1110fc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-30 Tobias Burnus <tobias@codesourcery.com> + + * gimplify.c (gimplify_scan_omp_clauses): Remove FE-generated + GOMP_MAP_TO_PSET and GOMP_MAP_POINTER mapping for 'target update' + and 'target exit data'. + 2019-10-30 Martin Jambor <mjambor@suse.cz> ipa/92278 diff --git a/gcc/gimplify.c b/gcc/gimplify.c index fdf6b69..12ed3f8 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -8590,6 +8590,17 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p, default: break; } + /* For Fortran, not only the pointer to the data is mapped but also + the address of the pointer, the array descriptor etc.; for + 'exit data' - and in particular for 'delete:' - having an 'alloc:' + does not make sense. Likewise, for 'update' only transferring the + data itself is needed as the rest has been handled in previous + directives. */ + if ((code == OMP_TARGET_EXIT_DATA || code == OMP_TARGET_UPDATE) + && (OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_POINTER + || OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_TO_PSET)) + remove = true; + if (remove) break; if (DECL_P (decl) && outer_ctx && (region_type & ORT_ACC)) |