This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] RFC: Hook for insn costs?
- From: Jeff Law <law at redhat dot com>
- To: Richard Earnshaw <Richard dot Earnshaw at foss dot arm dot com>, 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: Thu, 3 Aug 2017 09:52:46 -0600
- Subject: Re: [patch] RFC: Hook for insn costs?
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx08.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 B79F0C0587D9
- References: <f227448a-8499-775a-d9bb-df90c5fc124b@gjlay.de> <20170715225119.GA13471@gate.crashing.org> <CAFiYyc21ALx=eSbOUMNo+B-MqMutVRgUfkpmi_7v1KkNs4kF3A@mail.gmail.com> <7990b65e-05dc-a292-0067-d77b06138a63@twiddle.net> <e6b43c90-b532-c0b5-a580-d2eff606549f@redhat.com> <9b930e45-a935-027e-5498-f73457c92b8b@foss.arm.com>
On 08/02/2017 01:34 PM, Richard Earnshaw wrote:
> On 26/07/17 18:54, Jeff Law wrote:
>> 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.
>>
>> Jeff
>>
>
> I'm not sure if that's a good or a bad thing.
I haven't really though much about it and I certainly wouldn't push for
it as a direction without further investigation. It's just one thing
that could be possible if we though it made sense.
jeff