Open sivarv opened 8 years ago
https://github.com/dotnet/coreclr/issues/2556#issuecomment-169755535 has a simple rule about when fast tail calls are used. IMHO, writing down a simple rules like this one is much more useful than documenting the exact conditions under which the current implementation performs fast tail-calls.
cc @jashook @jakobbotsch
To start with here is a blog post on Legacy JIT64 http://blogs.msdn.com/b/davbr/archive/2007/06/20/tail-call-jit-conditions.aspx
Since RyuJIT replaces LegacyJit64, the conditions remain the same modulo some differences that needs to be documented.
Also, document details on when a tail call is dispatched as fast tail call (epilog+jmp) and when it is dispatched via a slow mechanism (via tail call helper).
category:documentation theme:tail-call skill-level:intermediate cost:medium impact:small