diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2020-01-10 23:23:44 +0100 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gcc.gnu.org> | 2020-01-10 23:23:44 +0100 |
commit | b3b75e664a619dae98571a0b3ac8034f5fa7c2be (patch) | |
tree | c557ed2e8d6ac3cf602df662f0fb8d72c3b56888 /gcc/tree-pretty-print.c | |
parent | 68be73fc42b969d8d595aeda98e3ea962a7a9ed5 (diff) | |
download | gcc-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-pretty-print.c')
-rw-r--r-- | gcc/tree-pretty-print.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index e895a4f..fe2e62b 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -432,7 +432,7 @@ static void dump_omp_clause (pretty_printer *pp, tree clause, int spc, dump_flags_t flags) { const char *name; - + const char *modifier = NULL; switch (OMP_CLAUSE_CODE (clause)) { case OMP_CLAUSE_PRIVATE: @@ -446,13 +446,9 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, dump_flags_t flags) goto print_remap; case OMP_CLAUSE_LASTPRIVATE: name = "lastprivate"; - if (!OMP_CLAUSE_LASTPRIVATE_CONDITIONAL (clause)) - goto print_remap; - pp_string (pp, "lastprivate(conditional:"); - dump_generic_node (pp, OMP_CLAUSE_DECL (clause), - spc, flags, false); - pp_right_paren (pp); - break; + if (OMP_CLAUSE_LASTPRIVATE_CONDITIONAL (clause)) + modifier = "conditional:"; + goto print_remap; case OMP_CLAUSE_COPYIN: name = "copyin"; goto print_remap; @@ -464,6 +460,8 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, dump_flags_t flags) goto print_remap; case OMP_CLAUSE_USE_DEVICE_PTR: name = "use_device_ptr"; + if (OMP_CLAUSE_USE_DEVICE_PTR_IF_PRESENT (clause)) + modifier = "if_present:"; goto print_remap; case OMP_CLAUSE_USE_DEVICE_ADDR: name = "use_device_addr"; @@ -501,6 +499,8 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, dump_flags_t flags) print_remap: pp_string (pp, name); pp_left_paren (pp); + if (modifier) + pp_string (pp, modifier); dump_generic_node (pp, OMP_CLAUSE_DECL (clause), spc, flags, false); pp_right_paren (pp); |