2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-04-18 07:40:24 +08:00

lto.c (lto_wpa_write_files): Move call to lto_promote_cross_file_statics ...

2014-03-19  Richard Biener  <rguenther@suse.de>

	* lto.c (lto_wpa_write_files): Move call to
	lto_promote_cross_file_statics ...
	(do_whole_program_analysis): ... here, into the partitioning
	block.  Do not ggc_collect after lto_wpa_write_files but
	for a last time before it.

From-SVN: r208679
This commit is contained in:
Richard Biener 2014-03-19 11:35:59 +00:00 committed by Richard Biener
parent 8c9cfbe630
commit e41106fc81
2 changed files with 19 additions and 8 deletions

@ -1,3 +1,11 @@
2014-03-19 Richard Biener <rguenther@suse.de>
* lto.c (lto_wpa_write_files): Move call to
lto_promote_cross_file_statics ...
(do_whole_program_analysis): ... here, into the partitioning
block. Do not ggc_collect after lto_wpa_write_files but
for a last time before it.
2014-03-19 Jakub Jelinek <jakub@redhat.com>
PR lto/60571

@ -2568,11 +2568,6 @@ lto_wpa_write_files (void)
FOR_EACH_VEC_ELT (ltrans_partitions, i, part)
lto_stats.num_output_symtab_nodes += lto_symtab_encoder_size (part->encoder);
/* Find out statics that need to be promoted
to globals with hidden visibility because they are accessed from multiple
partitions. */
lto_promote_cross_file_statics ();
timevar_pop (TV_WHOPR_WPA);
timevar_push (TV_WHOPR_WPA_IO);
@ -3284,11 +3279,21 @@ do_whole_program_analysis (void)
node->aux = NULL;
lto_stats.num_cgraph_partitions += ltrans_partitions.length ();
/* Find out statics that need to be promoted
to globals with hidden visibility because they are accessed from multiple
partitions. */
lto_promote_cross_file_statics ();
timevar_pop (TV_WHOPR_PARTITIONING);
timevar_stop (TV_PHASE_OPT_GEN);
timevar_start (TV_PHASE_STREAM_OUT);
/* Collect a last time - in lto_wpa_write_files we may end up forking
with the idea that this doesn't increase memory usage. So we
absoultely do not want to collect after that. */
ggc_collect ();
timevar_start (TV_PHASE_STREAM_OUT);
if (!quiet_flag)
{
fprintf (stderr, "\nStreaming out");
@ -3297,10 +3302,8 @@ do_whole_program_analysis (void)
lto_wpa_write_files ();
if (!quiet_flag)
fprintf (stderr, "\n");
timevar_stop (TV_PHASE_STREAM_OUT);
ggc_collect ();
if (post_ipa_mem_report)
{
fprintf (stderr, "Memory consumption after IPA\n");