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
Index: ChangeLog
===================================================================
--- ChangeLog   (revision 210881)
+++ ChangeLog   (working copy)
@@ -1,3 +1,9 @@
+2014-05-23  Xinliang David Li  <davi...@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  <seg...@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)"

Reply via email to