diff options
author | Andi Kleen <ak@linux.intel.com> | 2013-04-23 03:10:16 +0000 |
---|---|---|
committer | Andi Kleen <ak@gcc.gnu.org> | 2013-04-23 03:10:16 +0000 |
commit | 1a0ad150a3e2fc16fe240810900d2b7bc1d0ec0d (patch) | |
tree | 137a24775822a70a771a287544196e8195585978 /gcc | |
parent | 057f8f20df4a1ef022ea917f4e7690b3092089c9 (diff) | |
download | gcc-1a0ad150a3e2fc16fe240810900d2b7bc1d0ec0d.zip gcc-1a0ad150a3e2fc16fe240810900d2b7bc1d0ec0d.tar.gz gcc-1a0ad150a3e2fc16fe240810900d2b7bc1d0ec0d.tar.bz2 |
Print lto report at the right place
The LTO report is currently printed when the type merging hash tables
are already destroyed, which makes them always show up as empty.
Print it earlier. Right now it's printed twice.
gcc/:
2013-04-22 Andi Kleen <ak@linux.intel.com>
* lto/lto.c (print_lto_report_1): Declare early.
(read_cgraph_and_symbols): Call print_lto_report_1 early.
From-SVN: r198173
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lto/lto.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7500eb7..082dfc6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2013-04-22 Andi Kleen <ak@linux.intel.com> + * lto/lto.c (print_lto_report_1): Declare early. + (read_cgraph_and_symbols): Call print_lto_report_1 early. + +2013-04-22 Andi Kleen <ak@linux.intel.com> + * common.opt (-flto-report-wpa): Add. * doc/invoke.texi (-flto-report-wpa): Add. * lto/lto.c (do_whole_program_analysis): Check for lto-report-wpa. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index f19bbb5..18af8c4 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -2895,6 +2895,8 @@ lto_flatten_files (struct lto_file_decl_data **orig, int count, int last_file_ix static int real_file_count; static GTY((length ("real_file_count + 1"))) struct lto_file_decl_data **real_file_decl_data; +static void print_lto_report_1 (void); + /* Read all the symbols from the input files FNAMES. NFILES is the number of files requested in the command line. Instantiate a global call graph by aggregating all the sub-graphs found in each @@ -2986,6 +2988,10 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) if (resolution_file_name) fclose (resolution); + /* Show the LTO report before launching LTRANS. */ + if (flag_lto_report || (flag_wpa && flag_lto_report_wpa)) + print_lto_report_1 (); + /* Free gimple type merging datastructures. */ htab_delete (gimple_types); gimple_types = NULL; |