This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, Pointer Bounds Checker 23/x] Function split
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 15 Sep 2014 13:51:58 +0400
- Subject: Re: [PATCH, Pointer Bounds Checker 23/x] Function split
- Authentication-results: sourceware.org; auth=none
- References: <20140603070950 dot GA20877 at msticlxl57 dot ims dot intel dot com> <538EC794 dot 1030903 at redhat dot com> <20140818155516 dot GF29976 at msticlxl57 dot ims dot intel dot com> <54076829 dot 5070004 at redhat dot com>
2014-09-03 23:12 GMT+04:00 Jeff Law <law@redhat.com>:
> On 08/18/14 09:55, Ilya Enkovich wrote:
>>
>> On 04 Jun 01:15, Jeff Law wrote:
>>>
>>> On 06/03/14 01:10, Ilya Enkovich wrote:
>>>>
>>>> Hi,
>>>>
>>>> This patch does not allow splitting in case bounds are returned until
>>>> retutrned bounds are supported. It also propagates instrumentation marks
>>>> for generated call and function.
>>>>
>>>> Bootstrapped and tested on linux-x86_64.
>>>>
>>>> Thanks,
>>>> Ilya
>>>> --
>>>> gcc/
>>>>
>>>> 2014-06-03 Ilya Enkovich <ilya.enkovich@intel.com>
>>>>
>>>> * ipa-split.c: Include tree-chkp.h.
>>>> (consider_split): Do not split when return bounds.
>>>> (split_function): Propagate Pointer Bounds Checker
>>>> instrumentation marks.
>>>
>>> It's a hack. There's no reason we can't support this. So I'll
>>> approve on the condition that you do look at removing this
>>> limitation in the future.
>>>
>>> jeff
>>>
>>
>> I did some work for function splitting and now patch cover more cases.
>> Now returned bounds are supported but it is not allowed to split producers
>> of returned pointer and its bounds. Is it OK?
>>
>> Thanks,
>> Ilya
>> --
>> 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.
>
> And if so, that makes me start to think the original hack wasn't so bad
> after all :-)
It's always nice to have a backup plan! :)
Ilya
>
> jeff
>