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]

Re: [PR debug/47106] account used vars only once


> Index: gcc/ipa-inline.c
> ===================================================================
> --- gcc/ipa-inline.c.orig	2011-02-07 09:23:31.554084216 -0200
> +++ gcc/ipa-inline.c	2011-02-07 09:25:20.570774611 -0200
> @@ -1794,7 +1794,7 @@ cgraph_early_inlining (void)
>  
>    cfun->always_inline_functions_inlined = true;
>  
> -  return todo;
> +  return todo | execute_fixup_cfg ();

Fixup_cfg exists to update function body after properties of other functions
it calls was changed (and originally also some EH edges was removed after
inlining, but this was fixed some time ago).
If you go for splitting early otimizatoin queue, you need to schedule fixup_cfg
as first of early lowered passes, or any invocation of verify_cfg would fail
until early inliner is run.
> Index: gcc/cgraphunit.c
> ===================================================================
> --- gcc/cgraphunit.c.orig	2011-02-07 09:23:31.962071817 -0200
> +++ gcc/cgraphunit.c	2011-02-07 09:25:20.590774004 -0200
> @@ -246,7 +246,6 @@ cgraph_process_new_functions (void)
>  	    cgraph_analyze_function (node);
>  	  push_cfun (DECL_STRUCT_FUNCTION (fndecl));
>  	  current_function_decl = fndecl;
> -	  compute_inline_parameters (node);

Hmm, this is because both ipa-sra and ipa-split take care to compute inliner parameters
themselves?
If you go for this, you probably should arrange also new function inserted by -fprofile-generate
to be processed by compute_inline_parameters.  We never inline those, but we should not get
uninitialized fields there since they are used for cost metrics of ipa-cp, too.

Honza


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