[LLVMdev] tail call optimization question

Chris Lattner clattner at apple.com
Thu Dec 22 14:15:02 PST 2011


On Dec 22, 2011, at 1:54 PM, Nicolas Ojeda Bar wrote:

> Hello,
> 
> Is tail call optimization performed if the ret instruction does not actually
> follow the tail call? Not according to the documentation, but in examples it seems
> to work. For example, consider the following definition of Ackerman's 
> function in ML (it has two tail calls):

It isn't "guaranteed", but yes, the optimizer is able to make it happen in some cases.

-Chris




More information about the llvm-dev mailing list