OSDN Git Service

* cgraphunit.c (init_cgraph): Only initialize dump file if it is not already
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 4 Jul 2010 22:21:39 +0000 (22:21 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 4 Jul 2010 22:21:39 +0000 (22:21 +0000)
        initialized.
        * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161811 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cgraphunit.c
gcc/lto/ChangeLog
gcc/lto/lto.c

index fca47ae..5a654ac 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-04  Jan Hubicka  <jh@suse.cz>
+
+        * cgraphunit.c (init_cgraph): Only initialize dump file if it is not already
+        initialized.
+
 2010-07-04  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * optabs.h (reload_in_optab, reload_out_optab, code_to_optab)
index 5a69afa..2988f1c 100644 (file)
@@ -2070,7 +2070,8 @@ cgraph_build_static_cdtor (char which, tree body, int priority)
 void
 init_cgraph (void)
 {
-  cgraph_dump_file = dump_begin (TDI_cgraph, NULL);
+  if (!cgraph_dump_file)
+    cgraph_dump_file = dump_begin (TDI_cgraph, NULL);
 }
 
 /* The edges representing the callers of the NEW_VERSION node were
index c3618b6..567cfcd 100644 (file)
@@ -1,3 +1,7 @@
+2010-07-04  Jan Hubicka  <jh@suse.cz>
+
+        * lto.c (read_cgraph_and_symbols): Dump cgraph before merging.
+
 2010-06-13  Richard Guenther  <rguenther@suse.de>
 
        * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
index 500cb4f..27d2600 100644 (file)
@@ -1435,6 +1435,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
   struct cgraph_node *node;
 
   lto_stats.num_input_files = nfiles;
+  init_cgraph ();
 
   timevar_push (TV_IPA_LTO_DECL_IN);
 
@@ -1534,6 +1535,12 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
 
   /* Finally merge the cgraph according to the decl merging decisions.  */
   timevar_push (TV_IPA_LTO_CGRAPH_MERGE);
+  if (cgraph_dump_file)
+    {
+      fprintf (cgraph_dump_file, "Before merging:\n");
+      dump_cgraph (cgraph_dump_file);
+      dump_varpool (cgraph_dump_file);
+    }
   lto_symtab_merge_cgraph_nodes ();
   ggc_collect ();