This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, MPX, 2/X] Pointers Checker [7/25] Suppress BUILT_IN_CHKP_ARG_BND optimizations.


2013/11/6 Ilya Enkovich <enkovich.gnu@gmail.com>:
> 2013/11/5 Jeff Law <law@redhat.com>:
>> On 11/04/13 06:27, Richard Biener wrote:
>>>
>>> On Thu, Oct 31, 2013 at 10:02 AM, Ilya Enkovich <enkovich.gnu@gmail.com>
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> Here is a patch which hadles the problem with optimization of
>>>> BUILT_IN_CHKP_ARG_BND calls.  Pointer Bounds Checker expects that argument
>>>> of this call is a default SSA_NAME of the PARM_DECL whose bounds we want to
>>>> get.  The problem is in optimizations which may replace arg with it's copy
>>>> or a known value.  This patch suppress such modifications.
>>>
>>>
>>> This doesn't seem like a good fix.  I suppose you require the same on
>>> RTL, that is, have the incoming arg reg coalesced with the use?
>>> In that case better set SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
>>
>> I agree.  This seems like the wrong direction.
>>
>> While I don't like abusing SSA_NAME_OCCURS_IN_ABNORMAL_PHI in this manner,
>> setting that flag should give them precisely the behaviour they want.  That
>> makes me think SSA_NAME_OCCURS_IN_ABNORMAL_PHI is poorly named.  But
>> addressing that is separate from this patch.
>>
>> Ilya, can you convert your code to set SSA_NAME_OCCURS_IN_ABNORMAL_PHI and
>> drop this patch?
>
> OK. I'll try SSA_NAME_OCCURS_IN_ABNORMAL_PHI approach and see if it
> causes any problems.

Seems flag works fine.  All my tests pass.  No need to make additional
changes in verifiers etc.  Fix will be included into instrumentation
pass patch.  This patch is dropped.

Thanks,
Ilya

>
> Thanks,
> Ilya
>
>>
>>
>> Jeff
>>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]