re PR tree-optimization/81488 (gcc goes off the limits allocating memory in gimple...
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Tue, 22 Aug 2017 17:32:26 +0000 (17:32 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Tue, 22 Aug 2017 17:32:26 +0000 (17:32 +0000)
commit65d3dce8e80d0a697d63c92abfde078a11e37e64
tree7bd5a8c89e8a944692ebd11c33f6ee68b3b8092b
parent03a9562184454fe5395e30b8a3429c4570979d86
re PR tree-optimization/81488 (gcc goes off the limits allocating memory in gimple-ssa-strength-reduction.c)

2017-08-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/81488
* gimple-ssa-strength-reduction (struct slsr_cand_d): Add visited
and cached_basis fields.
(MAX_SPREAD): New constant.
(alloc_cand_and_find_basis): Initialize new fields.
(clear_visited): New function.
(create_phi_basis_1): Rename from create_phi_basis, set visited
and cached_basis fields.
(create_phi_basis): New wrapper function.
(phi_add_costs_1): Rename from phi_add_costs, add spread
parameter, set visited field, short-circuit when limits reached.
(phi_add_costs): New wrapper function.
(record_phi_increments_1): Rename from record_phi_increments, set
visited field.
(record_phi_increments): New wrapper function.
(phi_incr_cost_1): Rename from phi_incr_cost, set visited field.
(phi_incr_cost): New wrapper function.
(all_phi_incrs_profitable_1): Rename from
all_phi_incrs_profitable, set visited field.
(all_phi_incrs_profitable): New wrapper function.

From-SVN: r251286
gcc/ChangeLog
gcc/gimple-ssa-strength-reduction.c