aboutsummaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2017-10-09 21:44:13 +0200
committerSegher Boessenkool <segher@gcc.gnu.org>2017-10-09 21:44:13 +0200
commitd09e78e89037b5096e55b04effa714fc40e19a8c (patch)
treee24c9b1f71385f43633cf5e52abe5626c37114b0 /gcc/ifcvt.c
parent90e491a7739dc2ae9a5b92945e4f0e48a3a91e39 (diff)
downloadgcc-d09e78e89037b5096e55b04effa714fc40e19a8c.zip
gcc-d09e78e89037b5096e55b04effa714fc40e19a8c.tar.gz
gcc-d09e78e89037b5096e55b04effa714fc40e19a8c.tar.bz2
Replace insn_rtx_cost with insn_cost and pattern_cost
This replaces insn_rtx_cost with insn_cost if an insn is readily available, and with pattern_cost otherwise. * cfgrtl.c (rtl_account_profile_record): Replace insn_rtx_cost with insn_cost. * combine.c (uid_insn_cost): Adjust comment. (combine_validate_cost): Adjust comment. Use pattern_cost instead of insn_rtx_cost (combine_instructions): Use insn_cost instead of insn_rtx_cost. * dse.c (find_shift_sequence): Ditto. * ifcvt.c (cheap_bb_rtx_cost_p): Ditto. (bb_valid_for_noce_process_p): Use pattern_cost. * rtl.h (insn_rtx_cost): Delete. (pattern_cost): New prototype. (insn_cost): New prototype. * rtlanal.c (insn_rtx_cost): Rename to... (pattern_cost): ... this. (insn_cost): New. From-SVN: r253560
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index e1b163c..278d5b24 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -121,7 +121,7 @@ count_bb_insns (const_basic_block bb)
return count;
}
-/* Determine whether the total insn_rtx_cost on non-jump insns in
+/* Determine whether the total insn_cost on non-jump insns in
basic block BB is less than MAX_COST. This function returns
false if the cost of any instruction could not be estimated.
@@ -140,7 +140,7 @@ cheap_bb_rtx_cost_p (const_basic_block bb,
: REG_BR_PROB_BASE;
/* Set scale to REG_BR_PROB_BASE to void the identical scaling
- applied to insn_rtx_cost when optimizing for size. Only do
+ applied to insn_cost when optimizing for size. Only do
this after combine because if-conversion might interfere with
passes before combine.
@@ -163,7 +163,7 @@ cheap_bb_rtx_cost_p (const_basic_block bb,
{
if (NONJUMP_INSN_P (insn))
{
- int cost = insn_rtx_cost (PATTERN (insn), speed) * REG_BR_PROB_BASE;
+ int cost = insn_cost (insn, speed) * REG_BR_PROB_BASE;
if (cost == 0)
return false;
@@ -3021,7 +3021,7 @@ bb_valid_for_noce_process_p (basic_block test_bb, rtx cond,
if (first_insn == last_insn)
{
*simple_p = noce_operand_ok (SET_DEST (first_set));
- *cost += insn_rtx_cost (first_set, speed_p);
+ *cost += pattern_cost (first_set, speed_p);
return *simple_p;
}
@@ -3037,7 +3037,7 @@ bb_valid_for_noce_process_p (basic_block test_bb, rtx cond,
/* The regs that are live out of test_bb. */
bitmap test_bb_live_out = df_get_live_out (test_bb);
- int potential_cost = insn_rtx_cost (last_set, speed_p);
+ int potential_cost = pattern_cost (last_set, speed_p);
rtx_insn *insn;
FOR_BB_INSNS (test_bb, insn)
{
@@ -3057,7 +3057,7 @@ bb_valid_for_noce_process_p (basic_block test_bb, rtx cond,
|| reg_overlap_mentioned_p (SET_DEST (sset), cond))
goto free_bitmap_and_fail;
- potential_cost += insn_rtx_cost (sset, speed_p);
+ potential_cost += pattern_cost (sset, speed_p);
bitmap_set_bit (test_bb_temps, REGNO (SET_DEST (sset)));
}
}