This is the mail archive of the
mailing list for the GCC project.
Re: RFD: rtx_cost changes
On 08/14/2010 10:07 AM, Richard Sandiford wrote:
> Bernd Schmidt <email@example.com> writes:
>> The patch below extends the rtx_costs interface by adding a SET_LHS
>> argument. I've left the old rtx_costs available as a macro; the new one
>> is called rtx_costs2, and there's a new target macro as well. This
>> allows for a more gradual transition, converting ports one by one. Some
>> re-tuning is probably needed to take full advantage of the new
> I'm playing Devil's Advocate here really, because you didn't seem
> to mention it explicitly, but... while I can see why this is useful
> in postreload (and beyond), is the SET_DEST really that meaningful
> before reload? If we consider:
> (set (reg PSEUDO1) (plus (reg PSUEDO1) (const_int 16)))
> to have a different cost from:
> (set (reg PSEUDO1) (plus (reg PSUEDO2) (const_int 16)))
> (as the thumb patch appears to) then won't that put an artificial
> barrier in the way of pre-reload optimisations? I wouldn't have
> thought having two different pseudos meant a great deal here.
> If PSEUDO2 dies in the instruction, then we can still tie
> the registers.
Good point. It's probably best not done for pseudos, at least in the
I had been wondering whether distinguishing between 2-operand and
3-operand insns could make a difference for synth_mult, but I'll leave
that for later.