[RFC] Handle unary pass-through jump functions for ipa-vrp

kugan kugan.vivekanandarajah@linaro.org
Tue Nov 8 10:13:00 GMT 2016


Hi,


On 04/11/16 04:36, Martin Jambor wrote:
> Hi,
>
> On Fri, Oct 28, 2016 at 02:03:47PM +1100, kugan wrote:
>>
>> ...snip...
>>
>> I have also separated the constant parameter conversion out and posted as
>> https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02309.html. This is now
>> handling just unary pass-through jump functions.
>>
>> Bootstrapped and regression tested on x86_64-linux-gnu with no new
>> regressions.
>>
>> Is this OK for trunk?
>>
>> Thanks,
>> Kugan
>>
>> gcc/testsuite/ChangeLog:
>>
>> 2016-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
>>
>> 	* gcc.dg/ipa/vrp7.c: New test.
>>
>>
>> gcc/ChangeLog:
>>
>> 2016-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
>>
>> 	* ipa-cp.c (ipa_get_jf_pass_through_result): Handle unary expressions.
>> 	(propagate_vr_accross_jump_function): Likewise.
>> 	* ipa-prop.c (ipa_set_jf_unary_pass_through): New.
>> 	(load_from_param_1): New.
>> 	(load_from_unmodified_param): Factor common part into load_from_param_1.
>> 	(load_from_param): New.
>> 	(compute_complex_assign_jump_func): Handle unary expressions.
>> 	(ipa_write_jump_function): Likewise.
>> 	(ipa_read_jump_function): Likewise.
>>
>>
>>> Patch is OK with changes Martin suggested.
>>>
>>> Honza
>>>
>
>> From b7d9b413951ba20d156a7801640cc7d7bc57c062 Mon Sep 17 00:00:00 2001
>> From: Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
>> Date: Fri, 28 Oct 2016 10:16:38 +1100
>> Subject: [PATCH 2/2] add unary jump function
>>
>> ---
>>  gcc/ipa-cp.c                    | 39 +++++++++++++++---
>>  gcc/ipa-prop.c                  | 89 +++++++++++++++++++++++++++++++++++------
>>  gcc/testsuite/gcc.dg/ipa/vrp7.c | 32 +++++++++++++++
>>  3 files changed, 142 insertions(+), 18 deletions(-)
>>  create mode 100644 gcc/testsuite/gcc.dg/ipa/vrp7.c
>>
>> diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
>> index 9f28557..8fc95dd 100644
>> --- a/gcc/ipa-cp.c
>> +++ b/gcc/ipa-cp.c
>> @@ -1225,13 +1225,21 @@ ipa_get_jf_pass_through_result (struct ipa_jump_func *jfunc, tree input)
>>      return NULL_TREE;
>>
>>    if (TREE_CODE_CLASS (ipa_get_jf_pass_through_operation (jfunc))
>> -      == tcc_comparison)
>> -    restype = boolean_type_node;
>> +      == tcc_unary)
>> +    {
>> +      res = fold_unary (ipa_get_jf_pass_through_operation (jfunc),
>> +			TREE_TYPE (input), input);
>> +    }
>
> Please do not put curly braces around a single statement.  Apart from
> that, no objection from me.

Thanks Martin, I will fix this.

Honza, is this OK for you with the above fix?

Thanks,
Kugan
>
> Thanks,
>
> Martin
>



More information about the Gcc-patches mailing list