public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: Jeff Law <law@redhat.com>
Cc: Jan Hubicka <hubicka@ucw.cz>,
	Ilya Enkovich <enkovich.gnu@gmail.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [CHKP] Never expand instrumentation thunks
Date: Thu, 02 Apr 2015 21:13:00 -0000	[thread overview]
Message-ID: <20150402211342.GA66655@kam.mff.cuni.cz> (raw)
In-Reply-To: <551DA612.3090901@redhat.com>

> On 04/02/2015 02:11 PM, Jan Hubicka wrote:
> >>>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;
> >
> >Yeah, this is another case where we hit problem with transparent alias pretending
> >to be thunk :)
> >I guess the patch is OK for GCC-5 and for next stage1 we can clean this up.
> I was actually building a compiler so I could take a look at this
> one under a debugger ;-)

I think it is really the transparent alias issue.  The comment seems pretty clear about it.
What is confusing is that instrumentation thunks are called thunks when they are
really not - thunk is a small hunk of code, while instrumentation thunk is a transparent
alias.

Too bad I did not notice we introduced transparent aliases, i would push out my
code for that. I will compare Ilya's changes with mine and hopefully we can
catch more bugs and unify the code next stage1.

Honza

  reply	other threads:[~2015-04-02 21:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18 12:19 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 [this message]
2015-04-02 21:16         ` Jeff Law
2015-04-03  8:58         ` Ilya Enkovich
2015-04-03 17:03           ` Jan Hubicka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150402211342.GA66655@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=enkovich.gnu@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).