This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [CHKP] Never expand instrumentation thunks
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 2 Apr 2015 17:51:50 +0300
- Subject: Re: [CHKP] Never expand instrumentation thunks
- Authentication-results: sourceware.org; auth=none
- References: <20150318121912 dot GB64546 at msticlxl57 dot ims dot intel dot com>
Ping. Patch doesn't affect not instrumented code.
Thanks,
Ilya
2015-03-18 15:19 GMT+03:00 Ilya Enkovich <enkovich.gnu@gmail.com>:
> Hi,
>
> This patch disables attempts to expand instrumentation thunks which appear when we create specialized function versions. Problem was found during SPEC2006 insatrumentation with '-Ofast -flto'. Unfortunately I couldn't make a small reproducer. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk?
>
> Thanks,
> Ilya
> --
> 2015-03-18 Ilya Enkovich <ilya.enkovich@intel.com>
>
> * cgraphunit.c (cgraph_node::expand_thunk): Don't expand
> instrumentation thunks.
>
>
> diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
> index e640907..abc9cfe 100644
> --- a/gcc/cgraphunit.c
> +++ b/gcc/cgraphunit.c
> @@ -1508,6 +1508,10 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)
> tree thunk_fndecl = decl;
> tree a;
>
> + /* Instrumentation thunk is the same function with
> + a different signature. Never need to expand it. */
> + if (thunk.add_pointer_bounds_args)
> + return false;
>
> if (!force_gimple_thunk && this_adjusting
> && targetm.asm_out.can_output_mi_thunk (thunk_fndecl, fixed_offset,