On Mon, Jun 29, 2015 at 09:34:40AM -0500, Segher Boessenkool wrote: > On Mon, Jun 29, 2015 at 05:16:39PM +0930, Alan Modra wrote: > > Note that we already have insn_rtx_cost, and it returns a minimum cost > > for a SET, so register move insns get a cost of 1 insn. However, > > despite insn_rtx_cost starting life in combine.c, even combine doesn't > > use it in all whole insn cases. :-( > > In what cases does it not?
Practically all of the occurrences of set_src_cost in combine.c can be called on whole insns. By "whole insn" I mean of course the right hand side of a set, or a single set inside a parallel. I'm not saying that this causes trouble, since I haven't seen a register move there (but I haven't looked very hard either). -- Alan Modra Australia Development Lab, IBM