peephole2: dead regs not marked as dead

Paolo Bonzini bonzini@gnu.org
Thu Oct 28 18:57:00 GMT 2010


On 10/28/2010 03:10 PM, Georg Lay wrote:
> Georg Lay schrieb:
>
>> This code is not nice.
>>
>> ;; d8 = d4 * d6
>> ;; d8 = d2
>> ;; d2 = d8
>> ;; return d2
>
> this should be
>
> ;; d2 = d4 * d6
> ;; d8 = d2
> ;; d2 = d8
> ;; return d2

It seems to me that some of your peepholes should instead be implemented 
using constraints and multiple alternatives (for example the xor one), 
so that reload and register allocation can do a better job.  However I 
can't tell without looking at the code.

Paolo



More information about the Gcc mailing list