This is the mail archive of the
mailing list for the GCC project.
Re: [patch] RFC: Hook for insn costs?
- From: Jeff Law <law at redhat dot com>
- To: Richard Henderson <rth at twiddle dot net>, Richard Biener <richard dot guenther at gmail dot com>, Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: Georg-Johann Lay <avr at gjlay dot de>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Wed, 26 Jul 2017 11:54:57 -0600
- Subject: Re: [patch] RFC: Hook for insn costs?
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 72BF9A49E8
- References: <firstname.lastname@example.org> <20170715225119.GA13471@gate.crashing.org> <CAFiYyc21ALx=eSbOUMNo+B-MqMutVRgUfkpmi_7v1KkNs4kF3A@mail.gmail.com> <email@example.com>
On 07/17/2017 02:35 PM, Richard Henderson wrote:
> On 07/17/2017 12:20 AM, Richard Biener wrote:
>> On Sun, Jul 16, 2017 at 12:51 AM, Segher Boessenkool
>>> Now what should it take as input? An rtx_insn, or just the pattern
>>> (as insn_rtx_cost does)?
>> Is there any useful info on the other operands of an rtx_insn? If not
>> then passing in the pattern (a rtx) might be somewhat more flexible.
>> Of course it's then way easier to confuse rtx_cost and insn_cost ...
> A lot of really complex by-hand pattern matching goes away if you know
> the instruction is valid, and you can look up an insn attribute. That
> suggests passing the insn and not the PATTERN.
Good point. In fact, it opens the possibility that costing could be
attached to the insn itself as just another attribute if it made sense
for the target to describe costing in that manner.