diff mbox

Fix broken graph dump

Message ID CAAkRFZ+k-N_Rx-PG3kd7zty_My3fHD97=OfPzEJJL4MKmrtTHw@mail.gmail.com
State New
Headers show

Commit Message

Xinliang David Li May 24, 2014, 4:44 a.m. UTC
graph dump is broken in trunk (and gcc-49) -- the subgraph of the last
function gets dumped. The patch fixed the problem. Also fixed the
function header dump -- the cgraph uid is still used in many places
such as -fdisable|enable-xxx options.

Ok for trunk?

David

Comments

Richard Biener May 26, 2014, 9:25 a.m. UTC | #1
On Sat, May 24, 2014 at 6:44 AM, Xinliang David Li <davidxl@google.com> wrote:
> graph dump is broken in trunk (and gcc-49) -- the subgraph of the last
> function gets dumped. The patch fixed the problem. Also fixed the
> function header dump -- the cgraph uid is still used in many places
> such as -fdisable|enable-xxx options.
>
> Ok for trunk?

Ok if tested ok.

Thanks,
Richard.

> David
diff mbox

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 210881)
+++ ChangeLog	(working copy)
@@ -1,3 +1,9 @@ 
+2014-05-23  Xinliang David Li  <davidxl@google.com>
+
+	* tree-pretty-print.c (dump_function_header): Print cgraph uid.
+	* passes.c (pass_init_dump_file): Do not set initialize
+	flag to false unconditionally.
+
 2014-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
 
 	* config/rs6000/440.md (ppc440-integer): Include shift without
Index: passes.c
===================================================================
--- passes.c	(revision 210881)
+++ passes.c	(working copy)
@@ -1895,7 +1895,6 @@  verify_curr_properties (function *fn, vo
 bool
 pass_init_dump_file (opt_pass *pass)
 {
-  pass->graph_dump_initialized = false;
   /* If a dump file name is present, open it if enabled.  */
   if (pass->static_pass_number != -1)
     {
Index: tree-pretty-print.c
===================================================================
--- tree-pretty-print.c	(revision 210881)
+++ tree-pretty-print.c	(working copy)
@@ -3465,6 +3465,7 @@  dump_function_header (FILE *dump_file, t
     fprintf (dump_file, ", decl_uid=%d", DECL_UID (fdecl));
   if (node)
     {
+      fprintf (dump_file, ", cgraph_uid=%d", node->uid);
       fprintf (dump_file, ", symbol_order=%d)%s\n\n", node->order,
                node->frequency == NODE_FREQUENCY_HOT
                ? " (hot)"