aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2010-04-21 19:44:03 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2010-04-21 17:44:03 +0000
commite792884f755b35f38d3868ec17473ac608f7dffd (patch)
treecfd66cda5ba04c051de517b5c83b259a5b88d52a /gcc/lto
parentecd03d10ccfc428749fcada10f9bee48e13f22cc (diff)
downloadgcc-e792884f755b35f38d3868ec17473ac608f7dffd.zip
gcc-e792884f755b35f38d3868ec17473ac608f7dffd.tar.gz
gcc-e792884f755b35f38d3868ec17473ac608f7dffd.tar.bz2
tree-pass.h (ipa_opt_pass_d): Rename function_read_summary...
* tree-pass.h (ipa_opt_pass_d): Rename function_read_summary; add write_optimization_summary, read_optimization_summary. (ipa_write_summaries_of_cgraph_node_set): Remove. (ipa_write_optimization_summaries): Declare. (ipa_read_optimization_summaries): Declare. * ipa-cp.c (pass_ipa_cp): Update. * ipa-reference.c (pass_ipa_reference): Update. * ipa-pure-const.c (pass_ipa_pure_const): Update. * lto-streamer-out.c (pass_ipa_lto_gimple, pass_ipa_lto_finish): Update. * ipa-inline.c (pass_ipa_inline): Update. * ipa.c (pass_ipa_whole_program): Update. * lto-wpa-fixup.c (pass_ipa_lto_wpa_fixup): Update. * passes.c (ipa_write_summaries_1): Do not test wpa. (ipa_write_optimization_summaries_1): New. (ipa_write_optimization_summaries): New. (ipa_read_summaries): Do not test ltrans. (ipa_read_optimization_summaries_1): New. (ipa_read_optimization_summaries): New. * lto.c (lto_wpa_write_files): Update. (read_cgraph_and_symbols): Be more verbose. (materialize_cgraph): Likewise. (do_whole_program_analysis): Likewise. From-SVN: r158616
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog7
-rw-r--r--gcc/lto/lto.c39
2 files changed, 44 insertions, 2 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index a97314c..74e0650 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,5 +1,12 @@
2010-04-21 Jan Hubicka <jh@suse.cz>
+ * lto.c (lto_wpa_write_files): Update.
+ (read_cgraph_and_symbols): Be more verbose.
+ (materialize_cgraph): Likewise.
+ (do_whole_program_analysis): Likewise.
+
+2010-04-21 Jan Hubicka <jh@suse.cz>
+
* lto.c (globalize_cross_file_statics): When function has address taken,
it needs to be public.
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index ea8f03a..12475f1 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -1046,7 +1046,7 @@ lto_wpa_write_files (void)
lto_set_current_out_file (file);
- ipa_write_summaries_of_cgraph_node_set (set);
+ ipa_write_optimization_summaries (set);
lto_set_current_out_file (NULL);
lto_elf_file_close (file);
@@ -1822,10 +1822,18 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
gcc_assert (num_objects == nfiles);
}
+ if (!quiet_flag)
+ fprintf (stderr, "Reading object files:");
+
/* Read all of the object files specified on the command line. */
for (i = 0, last_file_ix = 0; i < nfiles; ++i)
{
struct lto_file_decl_data *file_data = NULL;
+ if (!quiet_flag)
+ {
+ fprintf (stderr, " %s", fnames[i]);
+ fflush (stderr);
+ }
current_lto_file = lto_elf_file_open (fnames[i], false);
if (!current_lto_file)
@@ -1852,9 +1860,15 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
/* Each pass will set the appropriate timer. */
timevar_pop (TV_IPA_LTO_DECL_IO);
+ if (!quiet_flag)
+ fprintf (stderr, "\nReading the callgraph\n");
+
/* Read the callgraph. */
input_cgraph ();
+ if (!quiet_flag)
+ fprintf (stderr, "Merging declarations\n");
+
/* Merge global decls. */
lto_symtab_merge_decls ();
@@ -1862,8 +1876,14 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
lto_fixup_decls (all_file_decl_data);
free_gimple_type_tables ();
+ if (!quiet_flag)
+ fprintf (stderr, "Reading summaries\n");
+
/* Read the IPA summary data. */
- ipa_read_summaries ();
+ if (flag_ltrans)
+ ipa_read_optimization_summaries ();
+ else
+ ipa_read_summaries ();
/* Finally merge the cgraph according to the decl merging decisions. */
lto_symtab_merge_cgraph_nodes ();
@@ -1909,6 +1929,11 @@ materialize_cgraph (void)
unsigned i;
timevar_id_t lto_timer;
+ if (!quiet_flag)
+ fprintf (stderr,
+ flag_wpa ? "Materializing decls:" : "Reading function bodies:");
+
+
/* Now that we have input the cgraph, we need to clear all of the aux
nodes and read the functions if we are not running in WPA mode. */
timevar_push (TV_IPA_LTO_GIMPLE_IO);
@@ -1927,6 +1952,7 @@ materialize_cgraph (void)
if (node->local.lto_file_data
&& !DECL_IS_BUILTIN (node->decl))
{
+ announce_function (node->decl);
lto_materialize_function (node);
lto_stats.num_input_cgraph_nodes++;
}
@@ -1950,6 +1976,8 @@ materialize_cgraph (void)
/* Fix up any calls to DECLs that have become not exception throwing. */
lto_fixup_nothrow_decls ();
+ if (!quiet_flag)
+ fprintf (stderr, "\n");
timevar_pop (lto_timer);
}
@@ -1987,7 +2015,14 @@ do_whole_program_analysis (void)
lto_1_to_1_map ();
+ if (!quiet_flag)
+ {
+ fprintf (stderr, "\nStreaming out");
+ fflush (stderr);
+ }
output_files = lto_wpa_write_files ();
+ if (!quiet_flag)
+ fprintf (stderr, "\n");
/* Show the LTO report before launching LTRANS. */
if (flag_lto_report)