[EVRP] Fold stmts with vrp_fold_stmt
kugan
kugan.vivekanandarajah@linaro.org
Wed Oct 5 05:58:00 GMT 2016
Hi Richard,
Thanks for the review.
On 04/10/16 19:56, Richard Biener wrote:
> On Tue, 4 Oct 2016, kugan wrote:
>
>> Hi,
>>
>> This patch improves Early VRP by folding stmts using vrp_fold_stmt as it is
>> done in ssa_propagate for VRP.
>
> Why?
I thought it would be good for early vrp to simplify stmts using ranges.
If we simplify obvious cases early, wouldn't it be better for IPA/LTO?
I'd like us to move away from the fold_stmt callback of
> substitute-and-fold (I have actually started some work towards that).
I must have missed it. But what is the general issue with
substitute-and-fold.
>
>> I have also changed EVRP to handle POINTER_TYPE_P. I will send follow up
>> patches to use this in IPA-VRP.
>
> For pointers all VRP does is track non-NULLness. Can you split out this
> part?
Attached patch does that.
> I'm really worried about all the testsuite changes -- it means we are
> losing test coverage for VRP :/
As you said earlier, unit testing with gimple FE should help. I am also
wondering if we should organize these testcases such that it is run once
without evrp and once with evrp to test both?
Thanks,
Kugan
gcc/ChangeLog:
2016-10-05 Kugan Vivekanandarajah <kuganv@linaro.org>
* tree-vrp.c (evrp_dom_walker::before_dom_children): Handle
POINTER_TYPE_P.
gcc/testsuite/ChangeLog:
2016-10-05 Kugan Vivekanandarajah <kuganv@linaro.org>
* gcc.dg/tree-ssa/evrp4.c: New test.
>
> Richard.
>
>> Bootstrapped and regression testd on x86_64-linux-gnu with no new regressions.
>> Is this OK for trunk?
>>
>> Thanks,
>> Kugan
>>
>> gcc/testsuite/ChangeLog:
>>
>> 2016-10-03 Kugan Vivekanandarajah <kuganv@linaro.org>
>>
>> * gcc.dg/pr68217.c: Adjust testcase as more cases are now handled in
>> evrp.
>> * gcc.dg/predict-1.c: Likewise.
>> * gcc.dg/predict-9.c: Likewise.
>> * gcc.dg/tree-ssa/pr20318.c: Likewise.
>> * gcc.dg/tree-ssa/pr21001.c: Likewise.
>> * gcc.dg/tree-ssa/pr21090.c: Likewise.
>> * gcc.dg/tree-ssa/pr21294.c: Likewise.
>> * gcc.dg/tree-ssa/pr21559.c: Likewise.
>> * gcc.dg/tree-ssa/pr21563.c: Likewise.
>> * gcc.dg/tree-ssa/pr23744.c: Likewise.
>> * gcc.dg/tree-ssa/pr25382.c: Likewise.
>> * gcc.dg/tree-ssa/pr61839_1.c: Likewise.
>> * gcc.dg/tree-ssa/pr68431.c: Likewise.
>> * gcc.dg/tree-ssa/vrp03.c: Likewise.
>> * gcc.dg/tree-ssa/vrp07.c: Likewise.
>> * gcc.dg/tree-ssa/vrp09.c: Likewise.
>> * gcc.dg/tree-ssa/vrp17.c: Likewise.
>> * gcc.dg/tree-ssa/vrp18.c: Likewise.
>> * gcc.dg/tree-ssa/vrp19.c: Likewise.
>> * gcc.dg/tree-ssa/vrp20.c: Likewise.
>> * gcc.dg/tree-ssa/vrp23.c: Likewise.
>> * gcc.dg/tree-ssa/vrp24.c: Likewise.
>> * gcc.dg/tree-ssa/vrp58.c: Likewise.
>> * gcc.dg/tree-ssa/vrp92.c: Likewise.
>> * gcc.dg/tree-ssa/vrp98.c: Likewise.
>> * gcc.dg/vrp-min-max-1.c: Likewise.
>>
>> gcc/ChangeLog:
>>
>> 2016-10-03 Kugan Vivekanandarajah <kuganv@linaro.org>
>>
>> * tree-vrp.c (evrp_dom_walker::before_dom_children): Handle
>> POINTER_TYPE_P. Also fold stmts with vrp_fold_stmt.
>>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Handle-pointer-type-in-evrp.patch
Type: text/x-patch
Size: 1523 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161005/ea96e094/attachment.bin>
More information about the Gcc-patches
mailing list