This is the mail archive of the
mailing list for the GCC project.
Re: rtx_cost of insns
- From: Alan Modra <amodra at gmail dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: Richard Earnshaw <Richard dot Earnshaw at foss dot arm dot com>, Jeff Law <law at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Tue, 30 Jun 2015 14:16:19 +0930
- Subject: Re: rtx_cost of insns
- Authentication-results: sourceware.org; auth=none
- References: <20150622055710 dot GQ1723 at bubble dot grove dot modra dot org> <558A3AA9 dot 6090406 at redhat dot com> <20150624091846 dot GC1723 at bubble dot grove dot modra dot org> <558ADF04 dot 9040807 at redhat dot com> <558BF3F7 dot 6080702 at foss dot arm dot com> <20150629074639 dot GG1723 at bubble dot grove dot modra dot org> <20150629143440 dot GA28537 at gate dot crashing dot org>
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).
Australia Development Lab, IBM