1//===-- llvm/Support/CodeGen.h - CodeGen Concepts ---------------*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file define some types which define code generation concepts. For
11// example, relocation model.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_SUPPORT_CODEGEN_H
16#define LLVM_SUPPORT_CODEGEN_H
17
18namespace llvm {
19
20  // Relocation model types.
21  namespace Reloc {
22  enum Model { Static, PIC_, DynamicNoPIC, ROPI, RWPI, ROPI_RWPI };
23  }
24
25  // Code model types.
26  namespace CodeModel {
27    // Sync changes with CodeGenCWrappers.h.
28  enum Model { Small, Kernel, Medium, Large };
29  }
30
31  namespace PICLevel {
32    // This is used to map -fpic/-fPIC.
33    enum Level { NotPIC=0, SmallPIC=1, BigPIC=2 };
34  }
35
36  namespace PIELevel {
37    enum Level { Default=0, Small=1, Large=2 };
38  }
39
40  // TLS models.
41  namespace TLSModel {
42    enum Model {
43      GeneralDynamic,
44      LocalDynamic,
45      InitialExec,
46      LocalExec
47    };
48  }
49
50  // Code generation optimization level.
51  namespace CodeGenOpt {
52    enum Level {
53      None,        // -O0
54      Less,        // -O1
55      Default,     // -O2, -Os
56      Aggressive   // -O3
57    };
58  }
59
60}  // end llvm namespace
61
62#endif
63