public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ilya Enkovich <enkovich.gnu@gmail.com>
To: Jeff Law <law@redhat.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [CHKP] Support returned bounds in thunks expand
Date: Fri, 03 Apr 2015 08:38:00 -0000	[thread overview]
Message-ID: <CAMbmDYbw-QOsv=UMWsZ0tpSro63ut9ffXkxNeXKyEHhgsdjC9g@mail.gmail.com> (raw)
In-Reply-To: <551D9BA6.8080908@redhat.com>

2015-04-02 22:42 GMT+03:00 Jeff Law <law@redhat.com>:
> On 04/02/2015 08:49 AM, Ilya Enkovich wrote:
>>
>> Ping
>>
>> 2015-03-10 13:12 GMT+03:00 Ilya Enkovich <enkovich.gnu@gmail.com>:
>>>
>>> Hi,
>>>
>>> Currentl we loose returned bounds when functions are merged.  This patch
>>> fixes it by adding returne bounds support for cgraph_node::expand_thunk.
>>> Bootstrapped and tested on x86_64-unknown-linux-gnu.  OK for trunk?
>>>
>>> Thanks,
>>> Ilya
>>> --
>>> gcc/
>>>
>>> 2015-03-06  Ilya Enkovich  <ilya.enkovich@intel.com>
>>>
>>>          * cgraphunit.c (cgraph_node::expand_thunk): Build returned
>>>          bounds for instrumented functions.
>>>
>>> gcc/testsuite/
>>>
>>> 2015-03-06  Ilya Enkovich  <ilya.enkovich@intel.com>
>>>
>>>          * gcc/testsuite/gcc.target/i386/thunk-retbnd.c: New.
>
> I really dislike the amount of gimple and bounded pointer knowledge in this
> code.
>
> It seems like a significant modularity violation and while you didn't
> introduce the gimple stuff, we probably shouldn't be making it worse.
>
> Is it possible to let this code build up the thunk, then pass it off as a
> whole to the chkp code to add the instrumentation, particularly for the
> return value?

OK, will rework the patch.

>
> ALso, is this critical for stage4?  It looks like this is strictly a QofI
> change, correct?

Actually having just a tail call in a function we don't lose bounds
and I don't expect it affects QofI. But we get instrumented function
with no returned bounds for a pointer which triggers an assert
somewhere (don't remember exact place). I'll revisit the original
problem and will probably make a simpler stability fix for now,
leaving thunk modification for stage 1.

Thanks,
Ilya

>
> jeff
>

  reply	other threads:[~2015-04-03  8:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 10:13 Ilya Enkovich
2015-04-02 14:49 ` Ilya Enkovich
2015-04-02 19:42   ` Jeff Law
2015-04-03  8:38     ` Ilya Enkovich [this message]
2015-04-02 20:55   ` Jan Hubicka
2015-04-03  8:46     ` Ilya Enkovich
2015-04-03 17:05       ` Jan Hubicka
2015-04-07 14:12         ` Ilya Enkovich
2015-04-07 20:33           ` Jan Hubicka
2015-04-07 23:28             ` Ilya Enkovich

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='CAMbmDYbw-QOsv=UMWsZ0tpSro63ut9ffXkxNeXKyEHhgsdjC9g@mail.gmail.com' \
    --to=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).