[LLVMdev] Destination register needs to be valid after callee saved register restore when tail calling

Dale Johannesen dalej at apple.com
Wed Aug 8 12:22:39 PDT 2007


On Aug 8, 2007, at 10:46 AM, Arnold Schwaighofer wrote:
> On 8 Aug 2007, at 18:27, Dale Johannesen wrote:
>> Inserting a pseudo before your tail call that defines all the callee-
>> saved
>> registers should work.  See FP_REG_KILL.
>
> the trick of dale seems to work with the downside that all registers
> are safed (and in llvm-2.0 the epilogue inserter ignoring
> the isTerminator instruction - note to myself: should move to trunk
> soon!)

Right, and that's a big downside.

Many targets are going to have this problem, maybe we should be  
looking for something generic.  I don't think hardcoding a particular  
register is the right way to do this.







More information about the llvm-dev mailing list