LLVM API Documentation
00001 //===-- llvm/CallingConv.h - LLVM Calling Conventions -----------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file was developed by the LLVM research group and is distributed under 00006 // the University of Illinois Open Source License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file defines a set of enums which specify the assigned numeric values 00011 // for known llvm calling conventions. 00012 // 00013 //===----------------------------------------------------------------------===// 00014 00015 #ifndef LLVM_CALLINGCONV_H 00016 #define LLVM_CALLINGCONV_H 00017 00018 namespace llvm { 00019 00020 /// CallingConv Namespace - This namespace contains an enum with a value for 00021 /// the well-known calling conventions. 00022 /// 00023 namespace CallingConv { 00024 enum ID { 00025 // C - The default llvm calling convention, compatible with C. This 00026 // convention is the only calling convention that supports varargs calls. 00027 // As with typical C calling conventions, the callee/caller have to tolerate 00028 // certain amounts of prototype mismatch. 00029 C = 0, 00030 00031 00032 // Generic LLVM calling conventions. None of these calling conventions 00033 // support varargs calls, and all assume that the caller and callee 00034 // prototype exactly match. 00035 00036 // Fast - This calling convention attempts to make calls as fast as possible 00037 // (e.g. by passing things in registers). 00038 Fast = 8, 00039 00040 // Cold - This calling convention attempts to make code in the caller as 00041 // efficient as possible under the assumption that the call is not commonly 00042 // executed. As such, these calls often preserve all registers so that the 00043 // call does not break any live ranges in the caller side. 00044 Cold = 9, 00045 00046 // Target - This is the start of the target-specific calling conventions, 00047 // e.g. fastcall and thiscall on X86. 00048 FirstTargetCC = 64 00049 }; 00050 } // End CallingConv namespace 00051 00052 } // End llvm namespace 00053 00054 #endif