[PATCH PR90078]Capping comp_cost computation in ivopts
Wed Apr 17 07:00:00 GMT 2019
As discussed in PR90078, this patch checks possible infinite_cost overflow in ivopts.
Also as discussed, overflow happens mostly because of cost scaling wrto bb_freq/loop_freq.
For the moment, we only implement capping in comp_cost operators, while in next
stage1, we may instead implement capping in get_scaled_computation_cost_at with
more supporting benchmark data.
BTW, I think switching costs around comparison between infinite_cost is unnecessary
since there will be no overflow in integer after capping with infinite_cost.
Bootstrap and test on x86_64, is it OK?
2019-04-17 Bin Cheng <email@example.com>
* tree-ssa-loop-ivopts.c (comp_cost::operator +,-,+=,-+,/=,*=): Add
checks for infinite_cost overflow.
2018-04-17 Bin Cheng <firstname.lastname@example.org>
* gcc/testsuite/g++.dg/tree-ssa/pr90078.C: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8310 bytes
Desc: not available
More information about the Gcc-patches