Disable ipa-reference with -fprofile-arcs

Richard Guenther rguenther@suse.de
Mon Jan 10 13:10:00 GMT 2011


On Mon, 10 Jan 2011, Jan Hubicka wrote:

> Hi,
> this patch workarounds problems with ipa-reference and profile feedback.
> Profile feedback adds static var access into every function in program.
> Especially with LTO this makes ipa-reference tables to explode.  It is the case
> for Mozilla build where LTO -fprofile-generate OOms for me after allocating 9GB
> of bitmaps.
> 
> lto-Profilebootstrapped/regtested x86_64-linux, OK?

Can't we just identify those vars and not track them at all?  They
are DECL_ARTIFICIAL after all.  OTOH, why does one or two bits
per function blow up memory usage so much?

Richard.

> Honza
> 
> 	PR tree-optimization/47233
> 	* opts.c (common_handle_option): Disable ipa-reference with profile feedback.
> Index: opts.c
> ===================================================================
> --- opts.c	(revision 168596)
> +++ opts.c	(working copy)
> @@ -1561,6 +1561,11 @@ common_handle_option (struct gcc_options
>  	opts->x_flag_value_profile_transformations = value;
>        if (!opts_set->x_flag_inline_functions)
>  	opts->x_flag_inline_functions = value;
> +      /* 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_flag_ipa_reference = false;
>        break;
>  
>      case OPT_fshow_column:



More information about the Gcc-patches mailing list