Re: problems in interaction between peephole on CALL_INSN and final_scan_insn

2012-07-16 Thread Richard Henderson
On 07/08/2012 02:46 PM, Alan Lehotsky wrote: > Or are you just talking about defining a sibcall_epilogue pattern? ... and appropriate sibcall + sibcall_value patterns, yes. I.e. add the patterns such that you enable the generic tail-call optimizations within the compiler, rather than trying to pa

Re: problems in interaction between peephole on CALL_INSN and final_scan_insn

2012-07-11 Thread Hans-Peter Nilsson
On Sun, 8 Jul 2012, Alan Lehotsky wrote: > I'm certain there are better ways; can you be more specific though? > > Or are you just talking about defining a sibcall_epilogue pattern? I'm not Andrew but I think obviously enough "yes". Better to say, perhaps even document, that text peepholes are de

Re: problems in interaction between peephole on CALL_INSN and final_scan_insn

2012-07-08 Thread Alan Lehotsky
I'm certain there are better ways; can you be more specific though? Or are you just talking about defining a sibcall_epilogue pattern? On Jul 8, 2012, at 5:26 PM, Andrew Pinski wrote: > On Sun, Jul 8, 2012 at 2:23 PM, Alan Lehotsky wrote: >> When a peephole is recognized, the first insn in the

Re: problems in interaction between peephole on CALL_INSN and final_scan_insn

2012-07-08 Thread Andrew Pinski
On Sun, Jul 8, 2012 at 2:23 PM, Alan Lehotsky wrote: > When a peephole is recognized, the first insn in the group is replaced by a > pseudo insn that contains all the referenced operands in the TEMPLATE and > sets an INSN_CODE to indicate which peephole matched. > > This is all well and good, ex

problems in interaction between peephole on CALL_INSN and final_scan_insn

2012-07-08 Thread Alan Lehotsky
When a peephole is recognized, the first insn in the group is replaced by a pseudo insn that contains all the referenced operands in the TEMPLATE and sets an INSN_CODE to indicate which peephole matched. This is all well and good, except that if the peephole involves a CALL_INSN, final_scan_ins