On Tue, Aug 1, 2017 at 1:24 AM, Segher Boessenkool <seg...@kernel.crashing.org> wrote: > This series creates pattern_cost and insn_cost functions that together > replace the existing insn_rtx_cost function. > > pattern_cost is like the old insn_rtx_cost function; insn_cost takes > an actual rtx_insn * as input, not just a pattern. > > Also a targetm.insn_cost is added, which targets can use to implement > a more exact cost more easily. > > The combine patch is pretty gross (but functional), it needs some > refactoring (to not call recog so often). The rs6000 patch is very > much a work in progress. > > How does this look? Is this the right direction?
I think it is the right direction. I'll leave the details to somebody more familiar with RTL. Richard. > > Segher > > > Segher Boessenkool (5): > Rename existing insn_cost to insn_sched_cost > Replace insn_rtx_cost with insn_cost and pattern_cost > combine: Use insn_cost instead of pattern_cost everywhere > Add targetm.insn_cost hook > rs6000: Implement insn_cost hook > > gcc/cfgrtl.c | 7 +++---- > gcc/combine.c | 40 +++++++++++++++++++++++++++++----------- > gcc/config/rs6000/rs6000.c | 14 ++++++++++++++ > gcc/doc/tm.texi | 12 ++++++++++++ > gcc/doc/tm.texi.in | 2 ++ > gcc/dse.c | 2 +- > gcc/haifa-sched.c | 14 +++++++------- > gcc/ifcvt.c | 12 ++++++------ > gcc/rtl.h | 3 ++- > gcc/rtlanal.c | 16 ++++++++++++++-- > gcc/sched-int.h | 2 +- > gcc/sched-rgn.c | 4 ++-- > gcc/sel-sched-ir.c | 2 +- > gcc/target.def | 14 ++++++++++++++ > 14 files changed, 108 insertions(+), 36 deletions(-) > > -- > 1.9.3 >