From dc7f174b5e049172f085ff5957f58998bdc446a4 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Fri, 16 Nov 2012 12:36:39 +0000 Subject: Add the Erlang/HiPE calling convention, patch by Yiannis Tsiouris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168166 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/CodeGenerator.rst | 4 ++-- docs/LangRef.html | 27 +++++++++++++++++++++------ 2 files changed, 23 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/CodeGenerator.rst b/docs/CodeGenerator.rst index 21af969d42..104b848ebf 100644 --- a/docs/CodeGenerator.rst +++ b/docs/CodeGenerator.rst @@ -1982,8 +1982,8 @@ Tail call optimization Tail call optimization, callee reusing the stack of the caller, is currently supported on x86/x86-64 and PowerPC. It is performed if: -* Caller and callee have the calling convention ``fastcc`` or ``cc 10`` (GHC - call convention). +* Caller and callee have the calling convention ``fastcc``, ``cc 10`` (GHC + calling convention) or ``cc 11`` (HiPE calling convention). * The call is a tail call - in tail position (ret immediately follows call and ret uses value of call or is void). diff --git a/docs/LangRef.html b/docs/LangRef.html index b4dd976306..b1ed4e6e48 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -729,10 +729,10 @@ define i32 @main() { ; i32()*   target to use whatever tricks it wants to produce fast code for the target, without having to conform to an externally specified ABI (Application Binary Interface). - Tail calls can only be optimized - when this or the GHC convention is used. This calling convention - does not support varargs and requires the prototype of all callees to - exactly match the prototype of the function definition. + Tail calls can only be optimized + when this, the GHC or the HiPE convention is used. This calling + convention does not support varargs and requires the prototype of all + callees to exactly match the prototype of the function definition.
"coldcc" - The cold calling convention:
This calling convention attempts to make code in the caller as efficient @@ -749,7 +749,7 @@ define i32 @main() { ; i32()*   disabling callee save registers. This calling convention should not be used lightly but only for specific situations such as an alternative to the register pinning performance technique often used when - implementing functional programming languages.At the moment only X86 + implementing functional programming languages. At the moment only X86 supports this convention and it has the following limitations: This calling convention supports - tail call optimization but + tail call optimization but requires both the caller and callee are using it.
+
"cc 11" - The HiPE calling convention:
+
This calling convention has been implemented specifically for use by the + High-Performance Erlang + (HiPE) compiler, the native code compiler of the + Ericsson's Open Source + Erlang/OTP system. It uses more registers for argument passing than + the ordinary C calling convention and defines no callee-saved registers. + The calling convention properly supports + tail call optimization but requires + that both the caller and the callee use it. It uses a register + pinning mechanism, similar to GHC's convention, for keeping + frequently accessed runtime components pinned to specific hardware + registers. At the moment only X86 supports this convention (both 32 and 64 + bit).
+
"cc <n>" - Numbered convention:
Any calling convention may be specified by number, allowing target-specific calling conventions to be used. Target specific calling -- cgit v1.2.3