diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-18 12:37:27 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-18 12:37:27 +0000 |
commit | 7013e87c514a70ba6ea24d9d7e16165730752543 (patch) | |
tree | be86e26d9b32f132c267f39e263298c225c62ae9 /gcc/expr.c | |
parent | b72d459f396af780bd6506f992b421663c4bb676 (diff) | |
download | gcc-7013e87c514a70ba6ea24d9d7e16165730752543.tar.gz |
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/expr.c')
-rw-r--r-- | gcc/expr.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 03a05f37362..7257c8bde16 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -3398,9 +3398,9 @@ compress_float_constant (rtx x, rtx y) REAL_VALUE_FROM_CONST_DOUBLE (r, y); if (targetm.legitimate_constant_p (dstmode, y)) - oldcost = rtx_cost (y, SET, speed); + oldcost = set_src_cost (y, speed); else - oldcost = rtx_cost (force_const_mem (dstmode, y), SET, speed); + oldcost = set_src_cost (force_const_mem (dstmode, y), speed); for (srcmode = GET_CLASS_NARROWEST_MODE (GET_MODE_CLASS (orig_srcmode)); srcmode != orig_srcmode; @@ -3427,7 +3427,8 @@ compress_float_constant (rtx x, rtx y) if (!insn_operand_matches (ic, 1, trunc_y)) continue; /* This is valid, but may not be cheaper than the original. */ - newcost = rtx_cost (gen_rtx_FLOAT_EXTEND (dstmode, trunc_y), SET, speed); + newcost = set_src_cost (gen_rtx_FLOAT_EXTEND (dstmode, trunc_y), + speed); if (oldcost < newcost) continue; } @@ -3435,7 +3436,8 @@ compress_float_constant (rtx x, rtx y) { trunc_y = force_const_mem (srcmode, trunc_y); /* This is valid, but may not be cheaper than the original. */ - newcost = rtx_cost (gen_rtx_FLOAT_EXTEND (dstmode, trunc_y), SET, speed); + newcost = set_src_cost (gen_rtx_FLOAT_EXTEND (dstmode, trunc_y), + speed); if (oldcost < newcost) continue; trunc_y = validize_mem (trunc_y); |