From 01ec0a6cc0b783f41dc3f15dff6247125cd3041e Mon Sep 17 00:00:00 2001 From: hubicka Date: Sun, 4 Jul 2010 22:21:39 +0000 Subject: [PATCH] * cgraphunit.c (init_cgraph): Only initialize dump file if it is not already 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 | 5 +++++ gcc/cgraphunit.c | 3 ++- gcc/lto/ChangeLog | 4 ++++ gcc/lto/lto.c | 7 +++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fca47ae..5a654ac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-07-04 Jan Hubicka + + * cgraphunit.c (init_cgraph): Only initialize dump file if it is not already + initialized. + 2010-07-04 Richard Sandiford * optabs.h (reload_in_optab, reload_out_optab, code_to_optab) diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 5a69afa..2988f1c 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -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 diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index c3618b6..567cfcd 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,7 @@ +2010-07-04 Jan Hubicka + + * lto.c (read_cgraph_and_symbols): Dump cgraph before merging. + 2010-06-13 Richard Guenther * lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 500cb4f..27d2600 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -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 (); -- 2.7.4