From: Alexandre Oliva Date: Mon, 6 Jun 2011 13:24:55 +0000 (+0000) Subject: tree-pretty-print.c (dump_function_header): Add flags. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6d8402ac13cd591026591be13329c4eda24ce639;p=gcc.git tree-pretty-print.c (dump_function_header): Add flags. * tree-pretty-print.c (dump_function_header): Add flags. Don't dump decl_uid with nouid. * tree-pretty-print.h (dump_function_header): Adjust. * final.c (rest_of_clean_state): Pass dump_flags on, with nouid. * passes.c (pass_init_dump_file): Pass dump_flags on. * tree-cfg.c (gimple_dump_cfg): Pass flags on. From-SVN: r174698 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e635fe0a400..59bf1fc2c99 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2011-06-06 Alexandre Oliva + + * tree-pretty-print.c (dump_function_header): Add flags. + Don't dump decl_uid with nouid. + * tree-pretty-print.h (dump_function_header): Adjust. + * final.c (rest_of_clean_state): Pass dump_flags on, with nouid. + * passes.c (pass_init_dump_file): Pass dump_flags on. + * tree-cfg.c (gimple_dump_cfg): Pass flags on. + 2011-06-06 Alexandre Oliva PR bootstrap/49270 diff --git a/gcc/final.c b/gcc/final.c index af8047c1608..748042abf10 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -4361,10 +4361,11 @@ rest_of_clean_state (void) } else { - dump_function_header (final_output, current_function_decl); flag_dump_noaddr = flag_dump_unnumbered = 1; if (flag_compare_debug_opt || flag_compare_debug) dump_flags |= TDF_NOUID; + dump_function_header (final_output, current_function_decl, + dump_flags); final_insns_dump_p = true; for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) diff --git a/gcc/passes.c b/gcc/passes.c index d5189ca17d2..9f328cd2fc5 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -1638,7 +1638,7 @@ pass_init_dump_file (struct opt_pass *pass) dump_file_name = get_dump_file_name (pass->static_pass_number); dump_file = dump_begin (pass->static_pass_number, &dump_flags); if (dump_file && current_function_decl) - dump_function_header (dump_file, current_function_decl); + dump_function_header (dump_file, current_function_decl, dump_flags); return initializing_dump; } else diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 5ba659c2b0b..85fece45d43 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -2052,7 +2052,7 @@ gimple_dump_cfg (FILE *file, int flags) { if (flags & TDF_DETAILS) { - dump_function_header (file, current_function_decl); + dump_function_header (file, current_function_decl, flags); fprintf (file, ";; \n%d basic blocks, %d edges, last basic block %d.\n\n", n_basic_blocks, n_edges, last_basic_block); diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index bfdcad637c8..2102aaa37f3 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -3018,7 +3018,7 @@ pp_base_tree_identifier (pretty_printer *pp, tree id) function dump. */ void -dump_function_header (FILE *dump_file, tree fdecl) +dump_function_header (FILE *dump_file, tree fdecl, int flags) { const char *dname, *aname; struct cgraph_node *node = cgraph_get_node (fdecl); @@ -3032,11 +3032,13 @@ dump_function_header (FILE *dump_file, tree fdecl) else aname = ""; + fprintf (dump_file, "\n;; Function %s (%s, funcdef_no=%d", + dname, aname, fun->funcdef_no); + if (!(flags & TDF_NOUID)) + fprintf (dump_file, ", decl_uid=%d", DECL_UID (fdecl)); if (node) { - fprintf (dump_file, "\n;; Function %s (%s, funcdef_no=%d, decl_uid=%d, cgraph_uid=%d)", - dname, aname, fun->funcdef_no, DECL_UID(fdecl), node->uid); - fprintf (dump_file, "%s\n\n", + fprintf (dump_file, ", cgraph_uid=%d)%s\n\n", node->uid, node->frequency == NODE_FREQUENCY_HOT ? " (hot)" : node->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED @@ -3046,6 +3048,5 @@ dump_function_header (FILE *dump_file, tree fdecl) : ""); } else - fprintf (dump_file, "\n;; Function %s (%s, funcdef_no=%d, decl_uid = %d)", - dname, aname, fun->funcdef_no, DECL_UID(fdecl)); + fprintf (dump_file, ")\n\n"); } diff --git a/gcc/tree-pretty-print.h b/gcc/tree-pretty-print.h index 60758789f15..0de18ca7a14 100644 --- a/gcc/tree-pretty-print.h +++ b/gcc/tree-pretty-print.h @@ -50,7 +50,7 @@ extern void debug_generic_expr (tree); extern void debug_generic_stmt (tree); extern void debug_tree_chain (tree); extern void percent_K_format (text_info *); -extern void dump_function_header (FILE *, tree); +extern void dump_function_header (FILE *, tree, int); /* In toplev.c */ extern bool default_tree_printer (pretty_printer *, text_info *, const char *,