This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, MPX, 2/X] Pointers Checker [7/25] Suppress BUILT_IN_CHKP_ARG_BND optimizations.
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 7 Nov 2013 14:01:39 +0400
- Subject: Re: [PATCH, MPX, 2/X] Pointers Checker [7/25] Suppress BUILT_IN_CHKP_ARG_BND optimizations.
- Authentication-results: sourceware.org; auth=none
- References: <20131031090213 dot GC54327 at msticlxl57 dot ims dot intel dot com> <CAFiYyc3gBc=CHDranqXo49NG6yFMSc3d-N8buFtjSS5G5Nga5w at mail dot gmail dot com> <5279256D dot 2030101 at redhat dot com> <CAMbmDYZ=Fr4_7240DKaNdQdSuShCJy9EC3_rrP5WxENp96V1_A at mail dot gmail dot com>
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
>>