Problem with peephole to peephole2 conversion

Paolo Bonzini paolo.bonzini@lu.unisi.ch
Thu Aug 25 14:53:00 GMT 2005


Ashwin Kolhe wrote:

>On 8/25/05, Paolo Bonzini <paolo.bonzini@lu.unisi.ch> wrote:
>  
>
>>I consider this to be less readable than the peep2 way to do it,
>>especially if your peephole2 had three or four instructions.  And
>>peep2_regno_dead_p uses an array (a circular buffer) so it's more
>>efficient.  Indeed dead_or_set_p even has a loop inside it.
>>
>>Paolo
>>    
>>
>
>
>Thanks a lot for ur help. can u give me a pointer to the origin of
>peep2_reg_dead_p?
>  
>
Do you mean the source code?  A hint: grep ^func_name *.c will get to it 
for every function in gcc.

In this case it is in recog.c, look at peep2_reg_dead_p but also 
peep2_regno_dead_p.  There are other peep2_* functions you may use.

Paolo



More information about the Gcc mailing list