From 5e8f01f434e547d21e6be3f44b2f5d9090fdc9db Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 18 Aug 2011 12:37:27 +0000 Subject: rtl.h (set_src_cost, [...]): New functions. gcc/ * rtl.h (set_src_cost, get_full_set_src_cost): New functions. * auto-inc-dec.c (attempt_change): Use set_src_cost instead of rtx_cost. * calls.c (precompute_register_parameters): Likewise. * combine.c (expand_compound_operation, make_extraction): Likewise. (force_to_mode, distribute_and_simplify_rtx): Likewise. * dse.c (find_shift_sequence): Likewise. * expmed.c (init_expmed, expand_mult, expand_smod_pow2): Likewise. * expr.c (compress_float_constant): Likewise. * fwprop.c (should_replace_address, try_fwprop_subst): Likewise. * gcse.c (want_to_gcse_p): Likewise. * ifcvt.c (noce_try_sign_mask): Likewise. * loop-doloop.c (doloop_optimize): Likewise. * loop-invariant.c (create_new_invariant): Likewise. * optabs.c (avoid_expensive_constant): Likewise. * postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands) (try_replace_in_use, reload_cse_move2add): Likewise. * reload1.c (calculate_elim_costs_all_insns): Likewise. (note_reg_elim_costly): Likewise. * rtlanal.c (insn_rtx_cost): Likewise. * simplify-rtx.c (simplify_binary_operation_1): Likewise. * stmt.c (lshift_cheap_p): Likewise. * tree-ssa-loop-ivopts.c (seq_cost, computation_cost): Likewise. * config/avr/avr.c (final_prescan_insn): Likewise. * config/bfin/bfin.c (bfin_rtx_costs): Likewise. * config/mips/mips.c (mips_binary_cost, mips_rtx_costs): Likewise. From-SVN: r177851 --- gcc/fwprop.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/fwprop.c') diff --git a/gcc/fwprop.c b/gcc/fwprop.c index 5db9ed8..236dda2 100644 --- a/gcc/fwprop.c +++ b/gcc/fwprop.c @@ -409,11 +409,11 @@ should_replace_address (rtx old_rtx, rtx new_rtx, enum machine_mode mode, - address_cost (new_rtx, mode, as, speed)); /* If the addresses have equivalent cost, prefer the new address - if it has the highest `rtx_cost'. That has the potential of + if it has the highest `set_src_cost'. That has the potential of eliminating the most insns without additional costs, and it is the same that cse.c used to do. */ if (gain == 0) - gain = rtx_cost (new_rtx, SET, speed) - rtx_cost (old_rtx, SET, speed); + gain = set_src_cost (new_rtx, speed) - set_src_cost (old_rtx, speed); return (gain > 0); } @@ -963,7 +963,7 @@ try_fwprop_subst (df_ref use, rtx *loc, rtx new_rtx, rtx def_insn, bool set_reg_ multiple sets. If so, assume the cost of the new instruction is not greater than the old one. */ if (set) - old_cost = rtx_cost (SET_SRC (set), SET, speed); + old_cost = set_src_cost (SET_SRC (set), speed); if (dump_file) { fprintf (dump_file, "\nIn insn %d, replacing\n ", INSN_UID (insn)); @@ -984,7 +984,7 @@ try_fwprop_subst (df_ref use, rtx *loc, rtx new_rtx, rtx def_insn, bool set_reg_ else if (DF_REF_TYPE (use) == DF_REF_REG_USE && set - && rtx_cost (SET_SRC (set), SET, speed) > old_cost) + && set_src_cost (SET_SRC (set), speed) > old_cost) { if (dump_file) fprintf (dump_file, "Changes to insn %d not profitable\n", -- cgit v1.1