public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [CHKP] Never expand instrumentation thunks
@ 2015-03-18 12:19 Ilya Enkovich
  2015-04-02 14:51 ` Ilya Enkovich
  0 siblings, 1 reply; 9+ messages in thread
From: Ilya Enkovich @ 2015-03-18 12:19 UTC (permalink / raw)
  To: gcc-patches

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,

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-04-03 17:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-18 12:19 [CHKP] Never expand instrumentation thunks Ilya Enkovich
2015-04-02 14:51 ` Ilya Enkovich
2015-04-02 19:51   ` Jeff Law
2015-04-02 20:11   ` Jan Hubicka
2015-04-02 20:27     ` Jeff Law
2015-04-02 21:13       ` Jan Hubicka
2015-04-02 21:16         ` Jeff Law
2015-04-03  8:58         ` Ilya Enkovich
2015-04-03 17:03           ` Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).