[vrp] use get_ptr_nonnull in tree-vrp

Richard Biener richard.guenther@gmail.com
Thu Oct 13 08:44:00 GMT 2016


On Thu, Oct 13, 2016 at 6:38 AM, kugan
<kugan.vivekanandarajah@linaro.org> wrote:
> Hi Richard,
>
>
> On 13/10/16 05:53, kugan wrote:
>>
>> Hi Richard,
>>
>> On 12/10/16 23:24, Richard Biener wrote:
>>>
>>> On Wed, Oct 12, 2016 at 8:56 AM, kugan
>>> <kugan.vivekanandarajah@linaro.org> wrote:
>>>>
>>>> Hi,
>>>>
>>>> This patch uses get_ptr_nonnull in tree-vrp.
>>>>
>>>> Bootstrapped and regression tested this with other patched without any
>>>> new regressions on x86_64-linux-gnu.
>>>>
>>>> Is this OK for trunk?
>>>
>>>
>>> Um.  Doesn't make much sense given nothing provides this info before
>>> EVRP?
>>> And if it makes sense then it makes sense not only for PARM_DECL SSA
>>> names.
>>
>> Not before EVRP. But when in TREE-VRP, EVRP + IPA-VRP should provide this.
>
>
> My primary intention was to pass it for PARM_DECL SSA names which comes from
> ipa-vrp. I have changed this now.

Ok I see.  The new patch still has it inside the SSA_NAME_IS_DEFAULT_DEF () if
so isn't any better in this regard.  To handle non-default-defs you'd
have to intersect
with non-NULL in update_value_range where we also intersect with get_range_info
info for integer types.

Your original patch was better so that is ok (once the prerequesites
are approved).

We can decide later if it's worth handling get_ptr_nonnull in
update_value_range.

Thanks,
Richard.

> Thanks,
> Kugan
>
>
>> I am not sure if this is the question?
>>
>> Thanks,
>> Kugan
>>>
>>>
>>> Richard.
>>>
>>>> Thanks,
>>>> Kugan
>>>>
>>>> gcc/testsuite/ChangeLog:
>>>>
>>>> 2016-10-12  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
>>>>
>>>>         * gcc.dg/ipa/vrp4.c: Adjust testcase.
>>>>
>>>> gcc/ChangeLog:
>>>>
>>>> 2016-10-12  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
>>>>
>>>>         * tree-vrp.c (get_value_range): Check get_ptr_nonnull.



More information about the Gcc-patches mailing list