PR63633: May middle-end come up width hard regs for insn expanders?

Vladimir Makarov vmakarov@redhat.com
Wed Apr 22 10:29:00 GMT 2015



On 21/04/15 02:04 AM, Segher Boessenkool wrote:
> On Tue, Apr 21, 2015 at 12:27:40AM +0200, Steven Bosscher wrote:
>> On Mon, Apr 20, 2015 at 10:11 PM, Vladimir Makarov wrote:
>>> I might be wrong but I think you have a bloated code because you use
>>> scratches.  I already told several times that usage of scratch is always a
>>> bad idea.  It was a bad idea for an old RA and is still a bad idea for IRA.
>>> The usage of scratches should be prohibited, probably we should write it
>>> somewhere.  It is better to use just a regular pseudo instead.
>> Thanks Vladimir, I didn't know this.
>> Does this mean that, for example, extendsidi in i386.md would be
>> better if it did not use match_scratch?
> The combiner can add or remove clobbers of scratches whenever needed,
> but it cannot do that for clobbers of pseudos.
>
>
Yes, I think there are some pitfalls with scratches in other passes.

As for combiner, it is probably worth to consider processing clobbers of 
pseudos with *one* reference as scratches too.  It might improve code 
for some cases although I am not sure about this.



More information about the Gcc mailing list