Add targetm.insn_cost hook

Programming / Compilers / GCC - segher [138bc75d-0d04-0410-961f-82ee72b054a4] - 9 October 2017 15:47 EDT

This adds a new hook that the insn_cost function uses if a target has implemented it (it uses the old pattern_cost nee insn_rtx_cost if not).



- target.def (insn_cost): New hook.
- doc/tm.texi.in (TARGET_INSN_COST): New hook.
- doc/tm.texi: Regenerate.
- rtlanal.c (insn_cost): Use the new hook.

1148203 Add targetm.insn_cost hook
gcc/ChangeLog | 7 +++++++
gcc/doc/tm.texi | 12 ++++++++++++
gcc/doc/tm.texi.in | 2 ++
gcc/rtlanal.c | 3 +++
gcc/target.def | 14 ++++++++++++++
5 files changed, 38 insertions(+)

Upstream: gcc.gnu.org


  • Share