summaryrefslogtreecommitdiffstats
path: root/gcc/fwprop.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-18 12:37:27 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-18 12:37:27 +0000
commit7013e87c514a70ba6ea24d9d7e16165730752543 (patch)
treebe86e26d9b32f132c267f39e263298c225c62ae9 /gcc/fwprop.c
parentb72d459f396af780bd6506f992b421663c4bb676 (diff)
downloadppe42-gcc-7013e87c514a70ba6ea24d9d7e16165730752543.tar.gz
ppe42-gcc-7013e87c514a70ba6ea24d9d7e16165730752543.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177851 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fwprop.c')
-rw-r--r--gcc/fwprop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/fwprop.c b/gcc/fwprop.c
index 5db9ed88887..236dda2dea5 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",
OpenPOWER on IntegriCloud