diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2017-10-09 21:44:13 +0200 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2017-10-09 21:44:13 +0200 |
commit | d09e78e89037b5096e55b04effa714fc40e19a8c (patch) | |
tree | e24c9b1f71385f43633cf5e52abe5626c37114b0 /gcc/cfgrtl.c | |
parent | 90e491a7739dc2ae9a5b92945e4f0e48a3a91e39 (diff) | |
download | gcc-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/cfgrtl.c')
-rw-r--r-- | gcc/cfgrtl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 6ef47b7..739d1bb 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -5039,14 +5039,13 @@ rtl_account_profile_record (basic_block bb, int after_pass, FOR_BB_INSNS (bb, insn) if (INSN_P (insn)) { - record->size[after_pass] - += insn_rtx_cost (PATTERN (insn), false); + record->size[after_pass] += insn_cost (insn, false); if (bb->count.initialized_p ()) record->time[after_pass] - += insn_rtx_cost (PATTERN (insn), true) * bb->count.to_gcov_type (); + += insn_cost (insn, true) * bb->count.to_gcov_type (); else if (profile_status_for_fn (cfun) == PROFILE_GUESSED) record->time[after_pass] - += insn_rtx_cost (PATTERN (insn), true) * bb->frequency; + += insn_cost (insn, true) * bb->frequency; } } |