diff options
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r-- | gcc/tree-pretty-print.c | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index 7de12f3..275dc7d 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -344,7 +344,16 @@ dump_function_name (pretty_printer *pp, tree node, dump_flags_t flags) if (CONVERT_EXPR_P (node)) node = TREE_OPERAND (node, 0); if (DECL_NAME (node) && (flags & TDF_ASMNAME) == 0) - pp_string (pp, lang_hooks.decl_printable_name (node, 1)); + { + pp_string (pp, lang_hooks.decl_printable_name (node, 1)); + if (flags & TDF_UID) + { + char uid_sep = (flags & TDF_GIMPLE) ? '_' : '.'; + pp_character (pp, 'D'); + pp_character (pp, uid_sep); + pp_scalar (pp, "%u", DECL_UID (node)); + } + } else dump_decl_name (pp, node, flags); } @@ -735,10 +744,23 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, dump_flags_t flags) pp_string (pp, "allocate("); if (OMP_CLAUSE_ALLOCATE_ALLOCATOR (clause)) { + pp_string (pp, "allocator("); dump_generic_node (pp, OMP_CLAUSE_ALLOCATE_ALLOCATOR (clause), spc, flags, false); - pp_colon (pp); + pp_right_paren (pp); + } + if (OMP_CLAUSE_ALLOCATE_ALIGN (clause)) + { + if (OMP_CLAUSE_ALLOCATE_ALLOCATOR (clause)) + pp_comma (pp); + pp_string (pp, "align("); + dump_generic_node (pp, OMP_CLAUSE_ALLOCATE_ALIGN (clause), + spc, flags, false); + pp_right_paren (pp); } + if (OMP_CLAUSE_ALLOCATE_ALLOCATOR (clause) + || OMP_CLAUSE_ALLOCATE_ALIGN (clause)) + pp_colon (pp); dump_generic_node (pp, OMP_CLAUSE_DECL (clause), spc, flags, false); pp_right_paren (pp); @@ -1152,6 +1174,8 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, dump_flags_t flags) pp_string (pp, "order("); if (OMP_CLAUSE_ORDER_UNCONSTRAINED (clause)) pp_string (pp, "unconstrained:"); + else if (OMP_CLAUSE_ORDER_REPRODUCIBLE (clause)) + pp_string (pp, "reproducible:"); pp_string (pp, "concurrent)"); break; @@ -2849,17 +2873,28 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags, break; /* Unary arithmetic and logic expressions. */ + case ADDR_EXPR: + if (flags & TDF_GIMPLE_VAL) + { + pp_string (pp, "_Literal ("); + dump_generic_node (pp, TREE_TYPE (node), spc, + flags & ~TDF_GIMPLE_VAL, false); + pp_character (pp, ')'); + } + /* Fallthru. */ case NEGATE_EXPR: case BIT_NOT_EXPR: case TRUTH_NOT_EXPR: - case ADDR_EXPR: case PREDECREMENT_EXPR: case PREINCREMENT_EXPR: case INDIRECT_REF: - if (TREE_CODE (node) == ADDR_EXPR + if (!(flags & TDF_GIMPLE) + && TREE_CODE (node) == ADDR_EXPR && (TREE_CODE (TREE_OPERAND (node, 0)) == STRING_CST || TREE_CODE (TREE_OPERAND (node, 0)) == FUNCTION_DECL)) - ; /* Do not output '&' for strings and function pointers. */ + /* Do not output '&' for strings and function pointers when not + dumping GIMPLE FE syntax. */ + ; else pp_string (pp, op_symbol (node)); |