aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2020-01-10 23:23:44 +0100
committerThomas Schwinge <tschwinge@gcc.gnu.org>2020-01-10 23:23:44 +0100
commitb3b75e664a619dae98571a0b3ac8034f5fa7c2be (patch)
treec557ed2e8d6ac3cf602df662f0fb8d72c3b56888 /gcc/tree.h
parent68be73fc42b969d8d595aeda98e3ea962a7a9ed5 (diff)
downloadgcc-b3b75e664a619dae98571a0b3ac8034f5fa7c2be.zip
gcc-b3b75e664a619dae98571a0b3ac8034f5fa7c2be.tar.gz
gcc-b3b75e664a619dae98571a0b3ac8034f5fa7c2be.tar.bz2
Further changes for the OpenACC 'if_present' clause on the 'host_data' construct
gcc/ * tree.h (OMP_CLAUSE_USE_DEVICE_PTR_IF_PRESENT): New definition. * tree-core.h: Document it. * gimplify.c (gimplify_omp_workshare): Set it. * omp-low.c (lower_omp_target): Use it. * tree-pretty-print.c (dump_omp_clause): Print it. gcc/testsuite/ * c-c++-common/goacc/host_data-1.c: Extend. * gfortran.dg/goacc/host_data-tree.f95: Likewise. gcc/ * omp-low.c (lower_omp_target) <OMP_CLAUSE_USE_DEVICE_PTR etc.>: Assert that for OpenACC we always have 'GOMP_MAP_USE_DEVICE_PTR'. libgomp/ * target.c (gomp_map_vars_internal) <GOMP_MAP_USE_DEVICE_PTR_IF_PRESENT>: Clean up/elaborate code paths. From-SVN: r280149
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 9ca9ab5..9342220 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1627,6 +1627,11 @@ class auto_suppress_location_wrappers
#define OMP_CLAUSE_MAP_IN_REDUCTION(NODE) \
TREE_PRIVATE (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_MAP))
+/* True on an OMP_CLAUSE_USE_DEVICE_PTR with an OpenACC 'if_present'
+ clause. */
+#define OMP_CLAUSE_USE_DEVICE_PTR_IF_PRESENT(NODE) \
+ (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_USE_DEVICE_PTR)->base.public_flag)
+
#define OMP_CLAUSE_PROC_BIND_KIND(NODE) \
(OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_PROC_BIND)->omp_clause.subcode.proc_bind_kind)