This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Reduce -flto -fprofile-generate memory use


Hi,
while compiling firefox I noticed that -fprofile-generage -flto goes to 8GB.
It turns out that this is caused by ipa_reference no longer being disabled
becaus in_lto_p became flag that is set later (it is not clear to me why it
needs to be this way).

I however do not see reason why not disable ipa-reference for non-lto path, too.

Bootstrapped/regtested x86_linux, comitted to mainline.
OK for 4.9.1?

Honza

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 209461)
+++ ChangeLog	(working copy)
@@ -1,5 +1,10 @@
 2014-04-16  Jan Hubicka  <hubicka@ucw.cz>
 
+	* opts.c (common_handle_option): Disable -fipa-reference coorectly
+	with -fuse-profile.
+
+2014-04-16  Jan Hubicka  <hubicka@ucw.cz>
+
 	* ipa-devirt.c (odr_type_d): Add field all_derivations_known.
 	(type_all_derivations_known_p): New predicate.
 	(type_all_ctors_visible_p): New predicate.
Index: opts.c
===================================================================
--- opts.c	(revision 209461)
+++ opts.c	(working copy)
@@ -1732,7 +1732,7 @@ common_handle_option (struct gcc_options
       /* FIXME: Instrumentation we insert makes ipa-reference bitmaps
 	 quadratic.  Disable the pass until better memory representation
 	 is done.  */
-      if (!opts_set->x_flag_ipa_reference && opts->x_in_lto_p)
+      if (!opts_set->x_flag_ipa_reference)
         opts->x_flag_ipa_reference = false;
       break;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]