Re: rtx_cost of insns

2015-06-29 Thread Segher Boessenkool
On Tue, Jun 30, 2015 at 02:16:19PM +0930, Alan Modra wrote: > 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

Re: rtx_cost of insns

2015-06-29 Thread Alan Modra
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_cos

Re: rtx_cost of insns

2015-06-29 Thread Segher Boessenkool
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 ins

Re: rtx_cost of insns

2015-06-29 Thread Oleg Endo
On 29 Jun 2015, at 16:46, Alan Modra wrote: > On Thu, Jun 25, 2015 at 01:28:39PM +0100, Richard Earnshaw wrote: >> Perhaps the best thing to do is to use the OUTER code to spot the >> specific case where you've got a SET and return non-zero in that case. > > That's exactly the path I've been fo

rtx_cost of insns

2015-06-29 Thread Alan Modra
On Thu, Jun 25, 2015 at 01:28:39PM +0100, Richard Earnshaw wrote: > Perhaps the best thing to do is to use the OUTER code to spot the > specific case where you've got a SET and return non-zero in that case. That's exactly the path I've been following. It's not as easy as it sounds.. First, some