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: [PATCH] IPA ICF: Fix for PR ipa/63851 and ipa/63852.


> Hello.
> 
> Following IPA ICF patch restricts thunk creation for static-chain thunks.
> Patch can bootstrap on x86_64-linux-pc and no new regression has been seen.
> 
> Ready for thunk?
> Thanks,
> Martin

> >From b247009735cd294b3fd8b727905cb47b5cdaeb51 Mon Sep 17 00:00:00 2001
> From: mliska <mliska@suse.cz>
> Date: Mon, 22 Dec 2014 10:46:41 +0100
> Subject: [PATCH] IPA ICF: Fix for PR ipa/63851 and ipa/63852.
> 
> gcc/ChangeLog:
> 
> 2014-12-22  Martin Liska  <mliska@suse.cz>
> 
> 	PR ipa/63851
> 	PR ipa/63852
> 	* ipa-icf.c (sem_function::merge): Ignore merge operation
> 	for a thunk created from static chain.

OK.
Please add also the code to match TARGET_OPTION and OPTIMIZATION nodes
Honza
> ---
>  gcc/ipa-icf.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
> index 6cdc21b..b8ef6e0 100644
> --- a/gcc/ipa-icf.c
> +++ b/gcc/ipa-icf.c
> @@ -694,6 +694,14 @@ sem_function::merge (sem_item *alias_item)
>  	  return 0;
>  	}
>  
> +      if (DECL_STATIC_CHAIN (alias->decl))
> +        {
> +         if (dump_file)
> +           fprintf (dump_file, "Thunk creation is risky for static-chain functions.\n\n");
> +
> +         return 0;
> +        }
> +
>        alias->icf_merged = true;
>        ipa_merge_profiles (local_original, alias);
>        alias->create_wrapper (local_original);
> -- 
> 2.1.2
> 


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