[LLVMdev] Tail-calling

Arnold Schwaighofer arnold.schwaighofer at gmail.com
Tue Sep 16 03:38:21 PDT 2008


When tail call optimization is enabled functions with the calling
convention fast (fastcc)  follow a callee pops arguments convention.
This means that every function call (to a fastcc function) will be
followed by a sub [n callee pops slots] instruction.

Also functions that are tail calling must ensure that they don't
overwrite their arguments so there might be additional moves of
arguments before a tail call.


On Sun, Sep 14, 2008 at 5:51 AM, OvermindDL1 <overminddl1 at gmail.com> wrote:
> This language has functions that will have to be tail-called due to
> having the ability to 'pause' its callstack, but some functions will
> not and I was just planning to call them like normal functions.  I am
> wondering, would it be 'faster' (at execution of the compiled code) to
> just put everything in the tail-call way, or is it still faster to
> call functions like normal when I can?
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



More information about the llvm-dev mailing list