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: [PATCH, Pointer Bounds Checker 23/x] Function split
Date: Mon, 15 Sep 2014 16:20:00 -0000	[thread overview]
Message-ID: <CAMbmDYagMaiXTBt7P2wMyQsBSSrKP51vTcp_iAtkVcVoUQiTHw@mail.gmail.com> (raw)
In-Reply-To: <54170849.4020505@redhat.com>

2014-09-15 19:39 GMT+04:00 Jeff Law <law@redhat.com>:
> On 09/15/14 03:51, Ilya Enkovich wrote:
>>>>
>>>> 2014-08-15  Ilya Enkovich  <ilya.enkovich@intel.com>
>>>>
>>>>          * ipa-split.c: Include tree-chkp.h.
>>>>          (find_retbnd): New.
>>>>          (consider_split): Do not split retbnd and retval
>>>>          producers.
>>>>          (split_function): Propagate Pointer Bounds Checker
>>>>          instrumentation marks and handle returned bounds.
>>>
>>>
>>> I don't think it's sufficient to just look at the SSA_NAME_DEFSTMT and
>>> verify that it's not in the header.
>>>
>>> You could easily have the SSA_NAME_DEF_STMT be a PHI which is in the same
>>> partition as the RETURN statement.  One of the PHI arguments might be fed
>>> from a statement in the header, right?
>>>
>>> Don't you have to look at the entire set of definitions which directly
>>> and
>>> indirectly feed the return statement and verify that each and every one
>>> is
>>> in the same partition as the return statement?
>>
>>
>> A problem I'm trying to avoid is that bounds in return statement are
>> not taken into account when checking for data dependencies between
>> parts.  It means we may have a case when return statement with bounds
>> is put into split part but bounds producer is not.  If
>> SSA_NAME_DEFSTMT for returned bounds is in the same partition as a
>> return then I do not think I should care about the rest of definitions
>> chain because regular split point checks should make sure we have
>> everything required.
>
> Is the data dependency in the gimple IL?  If so there shouldn't be anything
> particularly special we need to do.  If not, then how ugly would it be to
> "use" the bounds at the return statement to expose the missing dependency?
>
> Not asking you to make that change, just want to make sure that I understand
> the core issue and that if something is missing from a dependency standpoint
> that we consider what it would take to expose the missing dependency.

Gimple IL has required data dependencies to handle returns properly.
But split pass handles return basic block in a special way.  Return
basic block has to have a simple form and is not scanned using stmt
walkers as it is done for all other BBs by visit_bb.  It is assumed
that all dependencies for return BB are PHI args and returned value.
Thus returned bounds are just not taken into account.  That's how I
see the problem.

Ilya

>
> jeff
>

  reply	other threads:[~2014-09-15 16:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03  7:10 Ilya Enkovich
2014-06-04  7:15 ` Jeff Law
2014-06-06 10:22   ` Ilya Enkovich
2014-08-18 15:55   ` Ilya Enkovich
2014-09-03 19:12     ` Jeff Law
2014-09-15  9:52       ` Ilya Enkovich
2014-09-15 15:40         ` Jeff Law
2014-09-15 16:20           ` Ilya Enkovich [this message]
2014-09-15 21:08             ` Jeff Law
2014-09-16  9:09               ` Ilya Enkovich
2014-09-19 19:45                 ` Jeff Law
2014-09-22  6:40                   ` Ilya Enkovich
2014-09-23 15:55                     ` Jeff Law
2014-09-25 14:05                       ` 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=CAMbmDYagMaiXTBt7P2wMyQsBSSrKP51vTcp_iAtkVcVoUQiTHw@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).