Segher Boessenkool <seg...@kernel.crashing.org> writes:
> 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?
Seems good to me FWIW. Since this hook is entirely new, would it
be worth standardising on attribute names for size and speed costs,
a bit like "length" and "enabled"? I think otherwise the target hooks
are going to end up with similar boilerplate.