1 //===-- llvm/CallingConv.h - LLVM Calling Conventions -----------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines a set of enums which specify the assigned numeric values
11 // for known llvm calling conventions.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CALLINGCONV_H
16 #define LLVM_CALLINGCONV_H
20 /// CallingConv Namespace - This namespace contains an enum with a value for
21 /// the well-known calling conventions.
23 namespace CallingConv {
25 // C - The default llvm calling convention, compatible with C. This
26 // convention is the only calling convention that supports varargs calls.
27 // As with typical C calling conventions, the callee/caller have to tolerate
28 // certain amounts of prototype mismatch.
32 // Generic LLVM calling conventions. None of these calling conventions
33 // support varargs calls, and all assume that the caller and callee
34 // prototype exactly match.
36 // Fast - This calling convention attempts to make calls as fast as possible
37 // (e.g. by passing things in registers).
40 // Cold - This calling convention attempts to make code in the caller as
41 // efficient as possible under the assumption that the call is not commonly
42 // executed. As such, these calls often preserve all registers so that the
43 // call does not break any live ranges in the caller side.
46 // Target - This is the start of the target-specific calling conventions,
47 // e.g. fastcall and thiscall on X86.
50 } // End CallingConv namespace
52 } // End llvm namespace