Teach inline function how to update the callgraph when it makes changes.
[oota-llvm.git] / include / llvm / CallingConv.h
1 //===-- llvm/CallingConv.h - LLVM Calling Conventions -----------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
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.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines a set of enums which specify the assigned numeric values
11 // for known llvm calling conventions.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_CALLINGCONV_H
16 #define LLVM_CALLINGCONV_H
17
18 namespace llvm {
19
20 /// CallingConv Namespace - This namespace contains an enum with a value for
21 /// the well-known calling conventions.
22 ///
23 namespace CallingConv {
24   enum ID {
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.
29     C = 0,
30
31
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.
35
36     // Fast - This calling convention attempts to make calls as fast as possible
37     // (e.g. by passing things in registers).
38     Fast = 8,
39
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.
44     Cold = 9,
45
46     // Target - This is the start of the target-specific calling conventions,
47     // e.g. fastcall and thiscall on X86.
48     FirstTargetCC = 64,
49   };
50 } // End CallingConv namespace
51
52 } // End llvm namespace
53
54 #endif