re PR tree-optimization/90240 (ICE in try_improve_iv_set, at tree-ssa-loop-ivopts...
authorBin Cheng <bin.cheng@linux.alibaba.com>
Wed, 8 May 2019 11:24:38 +0000 (11:24 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Wed, 8 May 2019 11:24:38 +0000 (11:24 +0000)
commit98d8f142132ac670da2dc99cce530048343ab948
tree7ad68fb3e9d0d74aec04865d8da07767f3225581
parent4f0e90fae97a894247ec93336c8826cf4afb3d0d
re PR tree-optimization/90240 (ICE in try_improve_iv_set, at tree-ssa-loop-ivopts.c:6694)

PR tree-optimization/90240
* tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Scale cost
with respect to scaling factor pre-computed for each basic block.
(try_improve_iv_set): Return bool if best_cost equals to iv_ca cost.
(find_optimal_iv_set_1): Free iv_ca set if it has infinite_cost.
(COST_SCALING_FACTOR_BOUND, determine_scaling_factor): New.
(tree_ssa_iv_optimize_loop): Call determine_scaling_factor.  Extend
live range for array of loop's basic blocks.  Cleanup aux field of
loop's basic blocks.

gcc/testsuite
* gfortran.dg/graphite/pr90240.f: New test.

From-SVN: r271007
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/graphite/pr90240.f [new file with mode: 0644]
gcc/tree-ssa-loop-ivopts.c