IVOPTS: make comp_cost in a more c++ fashion.
authorMartin Liska <mliska@suse.cz>
Thu, 26 May 2016 17:12:32 +0000 (19:12 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 26 May 2016 17:12:32 +0000 (17:12 +0000)
commit8d18b6df04b0d471b65b9eb8c69fcc14a32bd62b
tree0d7ea0e39a8f50aff01a046b3df42c967bb2c95a
parentb3d2acb6dce9a25f433c2d5d5bae48e9d2b4149a
IVOPTS: make comp_cost in a more c++ fashion.

* tree-ssa-loop-ivopts.c (comp_cost::infinite_cost_p): New
function.
(operator+): Likewise.
(operator-): Likewise.
(comp_cost::operator+=): Likewise.
(comp_cost::operator-=): Likewise.
(comp_cost::operator/=): Likewise.
(comp_cost::operator*=): Likewise.
(operator<): Likewise.
(operator==): Likewise.
(operator<=): Likewise.
(new_cost): Remove.
(infinite_cost_p): Likewise.
(add_costs): Likewise.
(sub_costs): Likewise.
(compare_costs): Likewise.
(set_group_iv_cost): Use the newly introduced functions.
(get_address_cost): Likewise.
(get_shiftadd_cost): Likewise.
(force_expr_to_var_cost): Likewise.
(split_address_cost): Likewise.
(ptr_difference_cost): Likewise.
(difference_cost): Likewise.
(get_computation_cost_at): Likewise.
(determine_group_iv_cost_generic): Likewise.
(determine_group_iv_cost_address): Likewise.
(determine_group_iv_cost_cond): Likewise.
(autoinc_possible_for_pair): Likewise.
(determine_group_iv_costs): Likewise.
(cheaper_cost_pair): Likewise.
(iv_ca_recount_cost): Likewise.
(iv_ca_set_no_cp): Likewise.
(iv_ca_set_cp): Likewise.
(iv_ca_cost): Likewise.
(iv_ca_new): Likewise.
(iv_ca_dump): Likewise.
(iv_ca_narrow): Likewise.
(iv_ca_prune): Likewise.
(iv_ca_replace): Likewise.
(try_add_cand_for): Likewise.
(try_improve_iv_set): Likewise.
(find_optimal_iv_set): Likewise.

From-SVN: r236785
gcc/ChangeLog
gcc/tree-ssa-loop-ivopts.c