[LLVMdev] Tail calls

Chris Lattner sabre at nondot.org
Wed Jun 20 13:54:44 PDT 2007


On Wed, 20 Jun 2007, Sandro Magi wrote:
> Does "eligible" in the above mean that some analysis is performed, and
> if the call is found to meet certain criteria it is turned into a tail
> call? Or is it guaranteed to perform a tail call if 'tail' is
> specified?
>
> The last statement of that paragraph implies that some analysis is
> involved, but [1] states that there is no analysis performed.

Eligible means that, if followed by a return and if the caller and callee 
are both "fastcc"you should be guaranteed to get a tail call.  In practice 
however, tail calls aren't implemented by any of the targets, so you 
won't.

I consider this a serious bug, and welcome anyone interested in helping to 
improve this.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list