aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-pretty-print.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r--gcc/tree-pretty-print.c161
1 files changed, 159 insertions, 2 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c
index ce3f6a8..11f9005 100644
--- a/gcc/tree-pretty-print.c
+++ b/gcc/tree-pretty-print.c
@@ -330,6 +330,12 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
case OMP_CLAUSE_UNIFORM:
name = "uniform";
goto print_remap;
+ case OMP_CLAUSE_USE_DEVICE_PTR:
+ name = "use_device_ptr";
+ goto print_remap;
+ case OMP_CLAUSE_IS_DEVICE_PTR:
+ name = "is_device_ptr";
+ goto print_remap;
case OMP_CLAUSE__LOOPTEMP_:
name = "_looptemp_";
goto print_remap;
@@ -339,6 +345,12 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
case OMP_CLAUSE_USE_DEVICE:
name = "use_device";
goto print_remap;
+ case OMP_CLAUSE_TO_DECLARE:
+ name = "to";
+ goto print_remap;
+ case OMP_CLAUSE_LINK:
+ name = "link";
+ goto print_remap;
print_remap:
pp_string (pp, name);
pp_left_paren (pp);
@@ -362,6 +374,20 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
case OMP_CLAUSE_IF:
pp_string (pp, "if(");
+ switch (OMP_CLAUSE_IF_MODIFIER (clause))
+ {
+ case ERROR_MARK: break;
+ case OMP_PARALLEL: pp_string (pp, "parallel:"); break;
+ case OMP_TASK: pp_string (pp, "task:"); break;
+ case OMP_TASKLOOP: pp_string (pp, "taskloop:"); break;
+ case OMP_TARGET_DATA: pp_string (pp, "target data:"); break;
+ case OMP_TARGET: pp_string (pp, "target:"); break;
+ case OMP_TARGET_UPDATE: pp_string (pp, "target update:"); break;
+ case OMP_TARGET_ENTER_DATA:
+ pp_string (pp, "target enter data:"); break;
+ case OMP_TARGET_EXIT_DATA: pp_string (pp, "target exit data:"); break;
+ default: gcc_unreachable ();
+ }
dump_generic_node (pp, OMP_CLAUSE_IF_EXPR (clause),
spc, flags, false);
pp_right_paren (pp);
@@ -386,6 +412,13 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
break;
case OMP_CLAUSE_ORDERED:
pp_string (pp, "ordered");
+ if (OMP_CLAUSE_ORDERED_EXPR (clause))
+ {
+ pp_left_paren (pp);
+ dump_generic_node (pp, OMP_CLAUSE_ORDERED_EXPR (clause),
+ spc, flags, false);
+ pp_right_paren (pp);
+ }
break;
case OMP_CLAUSE_DEFAULT:
@@ -414,6 +447,8 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
case OMP_CLAUSE_SCHEDULE:
pp_string (pp, "schedule(");
+ if (OMP_CLAUSE_SCHEDULE_SIMD (clause))
+ pp_string (pp, "simd:");
switch (OMP_CLAUSE_SCHEDULE_KIND (clause))
{
case OMP_CLAUSE_SCHEDULE_STATIC:
@@ -470,8 +505,26 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
case OMP_CLAUSE_LINEAR:
pp_string (pp, "linear(");
+ switch (OMP_CLAUSE_LINEAR_KIND (clause))
+ {
+ case OMP_CLAUSE_LINEAR_DEFAULT:
+ break;
+ case OMP_CLAUSE_LINEAR_REF:
+ pp_string (pp, "ref(");
+ break;
+ case OMP_CLAUSE_LINEAR_VAL:
+ pp_string (pp, "val(");
+ break;
+ case OMP_CLAUSE_LINEAR_UVAL:
+ pp_string (pp, "uval(");
+ break;
+ default:
+ gcc_unreachable ();
+ }
dump_generic_node (pp, OMP_CLAUSE_DECL (clause),
spc, flags, false);
+ if (OMP_CLAUSE_LINEAR_KIND (clause) != OMP_CLAUSE_LINEAR_DEFAULT)
+ pp_right_paren (pp);
pp_colon (pp);
dump_generic_node (pp, OMP_CLAUSE_LINEAR_STEP (clause),
spc, flags, false);
@@ -504,6 +557,31 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
case OMP_CLAUSE_DEPEND_INOUT:
pp_string (pp, "inout");
break;
+ case OMP_CLAUSE_DEPEND_SOURCE:
+ pp_string (pp, "source)");
+ return;
+ case OMP_CLAUSE_DEPEND_SINK:
+ pp_string (pp, "sink:");
+ for (tree t = OMP_CLAUSE_DECL (clause); t; t = TREE_CHAIN (t))
+ if (TREE_CODE (t) == TREE_LIST)
+ {
+ dump_generic_node (pp, TREE_VALUE (t), spc, flags, false);
+ if (TREE_PURPOSE (t) != integer_zero_node)
+ {
+ if (OMP_CLAUSE_DEPEND_SINK_NEGATIVE (t))
+ pp_minus (pp);
+ else
+ pp_plus (pp);
+ dump_generic_node (pp, TREE_PURPOSE (t), spc, flags,
+ false);
+ }
+ if (TREE_CHAIN (t))
+ pp_comma (pp);
+ }
+ else
+ gcc_unreachable ();
+ pp_right_paren (pp);
+ return;
default:
gcc_unreachable ();
}
@@ -547,11 +625,29 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
pp_string (pp, "force_present");
break;
case GOMP_MAP_FORCE_DEALLOC:
- pp_string (pp, "force_dealloc");
+ pp_string (pp, "delete");
break;
case GOMP_MAP_FORCE_DEVICEPTR:
pp_string (pp, "force_deviceptr");
break;
+ case GOMP_MAP_ALWAYS_TO:
+ pp_string (pp, "always,to");
+ break;
+ case GOMP_MAP_ALWAYS_FROM:
+ pp_string (pp, "always,from");
+ break;
+ case GOMP_MAP_ALWAYS_TOFROM:
+ pp_string (pp, "always,tofrom");
+ break;
+ case GOMP_MAP_RELEASE:
+ pp_string (pp, "release");
+ break;
+ case GOMP_MAP_FIRSTPRIVATE_POINTER:
+ pp_string (pp, "firstprivate");
+ break;
+ case GOMP_MAP_STRUCT:
+ pp_string (pp, "struct");
+ break;
default:
gcc_unreachable ();
}
@@ -562,7 +658,9 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
if (OMP_CLAUSE_SIZE (clause))
{
if (OMP_CLAUSE_CODE (clause) == OMP_CLAUSE_MAP
- && OMP_CLAUSE_MAP_KIND (clause) == GOMP_MAP_POINTER)
+ && (OMP_CLAUSE_MAP_KIND (clause) == GOMP_MAP_POINTER
+ || OMP_CLAUSE_MAP_KIND (clause)
+ == GOMP_MAP_FIRSTPRIVATE_POINTER))
pp_string (pp, " [pointer assign, bias: ");
else if (OMP_CLAUSE_CODE (clause) == OMP_CLAUSE_MAP
&& OMP_CLAUSE_MAP_KIND (clause) == GOMP_MAP_TO_PSET)
@@ -660,6 +758,38 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
pp_right_paren (pp);
break;
+ case OMP_CLAUSE_PRIORITY:
+ pp_string (pp, "priority(");
+ dump_generic_node (pp, OMP_CLAUSE_PRIORITY_EXPR (clause),
+ spc, flags, false);
+ pp_right_paren (pp);
+ break;
+
+ case OMP_CLAUSE_GRAINSIZE:
+ pp_string (pp, "grainsize(");
+ dump_generic_node (pp, OMP_CLAUSE_GRAINSIZE_EXPR (clause),
+ spc, flags, false);
+ pp_right_paren (pp);
+ break;
+
+ case OMP_CLAUSE_NUM_TASKS:
+ pp_string (pp, "num_tasks(");
+ dump_generic_node (pp, OMP_CLAUSE_NUM_TASKS_EXPR (clause),
+ spc, flags, false);
+ pp_right_paren (pp);
+ break;
+
+ case OMP_CLAUSE_HINT:
+ pp_string (pp, "hint(");
+ dump_generic_node (pp, OMP_CLAUSE_HINT_EXPR (clause),
+ spc, flags, false);
+ pp_right_paren (pp);
+ break;
+
+ case OMP_CLAUSE_DEFAULTMAP:
+ pp_string (pp, "defaultmap(tofrom:scalar)");
+ break;
+
case OMP_CLAUSE__SIMDUID_:
pp_string (pp, "_simduid_(");
dump_generic_node (pp, OMP_CLAUSE__SIMDUID__DECL (clause),
@@ -778,6 +908,15 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags)
case OMP_CLAUSE_TASKGROUP:
pp_string (pp, "taskgroup");
break;
+ case OMP_CLAUSE_NOGROUP:
+ pp_string (pp, "nogroup");
+ break;
+ case OMP_CLAUSE_THREADS:
+ pp_string (pp, "threads");
+ break;
+ case OMP_CLAUSE_SIMD:
+ pp_string (pp, "simd");
+ break;
case OMP_CLAUSE_INDEPENDENT:
pp_string (pp, "independent");
break;
@@ -2624,6 +2763,10 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, int flags,
pp_string (pp, "#pragma omp distribute");
goto dump_omp_loop;
+ case OMP_TASKLOOP:
+ pp_string (pp, "#pragma omp taskloop");
+ goto dump_omp_loop;
+
case OACC_LOOP:
pp_string (pp, "#pragma acc loop");
goto dump_omp_loop;
@@ -2638,6 +2781,18 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, int flags,
dump_omp_clauses (pp, OMP_TARGET_DATA_CLAUSES (node), spc, flags);
goto dump_omp_body;
+ case OMP_TARGET_ENTER_DATA:
+ pp_string (pp, "#pragma omp target enter data");
+ dump_omp_clauses (pp, OMP_TARGET_ENTER_DATA_CLAUSES (node), spc, flags);
+ is_expr = false;
+ break;
+
+ case OMP_TARGET_EXIT_DATA:
+ pp_string (pp, "#pragma omp target exit data");
+ dump_omp_clauses (pp, OMP_TARGET_EXIT_DATA_CLAUSES (node), spc, flags);
+ is_expr = false;
+ break;
+
case OMP_TARGET:
pp_string (pp, "#pragma omp target");
dump_omp_clauses (pp, OMP_TARGET_CLAUSES (node), spc, flags);
@@ -2738,6 +2893,7 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, int flags,
case OMP_ORDERED:
pp_string (pp, "#pragma omp ordered");
+ dump_omp_clauses (pp, OMP_ORDERED_CLAUSES (node), spc, flags);
goto dump_omp_body;
case OMP_CRITICAL:
@@ -2750,6 +2906,7 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, int flags,
flags, false);
pp_right_paren (pp);
}
+ dump_omp_clauses (pp, OMP_CRITICAL_CLAUSES (node), spc, flags);
goto dump_omp_body;
case OMP_ATOMIC: