diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2011-06-06 13:24:55 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2011-06-06 13:24:55 +0000 |
commit | 6d8402ac13cd591026591be13329c4eda24ce639 (patch) | |
tree | 17c8c5596a02cb936bbd251b4cf84ef3d841da0a | |
parent | f75e1f1ee358b9beae2ec796930280fdd47a4eae (diff) | |
download | gcc-6d8402ac13cd591026591be13329c4eda24ce639.zip gcc-6d8402ac13cd591026591be13329c4eda24ce639.tar.gz gcc-6d8402ac13cd591026591be13329c4eda24ce639.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/final.c | 3 | ||||
-rw-r--r-- | gcc/passes.c | 2 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 2 | ||||
-rw-r--r-- | gcc/tree-pretty-print.c | 13 | ||||
-rw-r--r-- | gcc/tree-pretty-print.h | 2 |
6 files changed, 21 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e635fe0..59bf1fc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2011-06-06 Alexandre Oliva <aoliva@redhat.com> + * 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 <aoliva@redhat.com> + PR bootstrap/49270 * ipa-inline-analysis.c (read_predicate): Initialize all clauses. diff --git a/gcc/final.c b/gcc/final.c index af8047c..748042a 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 d5189ca..9f328cd 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 5ba659c..85fece4 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 bfdcad6..2102aaa 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 = "<unset-asm-name>"; + 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 6075878..0de18ca 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 *, |