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 18 namespace llvm { 19 20 // Relocation model types. 21 namespace Reloc { 22 enum Model { Default, Static, PIC_, DynamicNoPIC }; 23 } 24 25 // Code model types. 26 namespace CodeModel { 27 enum Model { Default, JITDefault, Small, Kernel, Medium, Large }; 28 } 29 30 // TLS models. 31 namespace TLSModel { 32 enum Model { 33 GeneralDynamic, 34 LocalDynamic, 35 InitialExec, 36 LocalExec 37 }; 38 } 39 40 // Code generation optimization level. 41 namespace CodeGenOpt { 42 enum Level { 43 None, // -O0 44 Less, // -O1 45 Default, // -O2, -Os 46 Aggressive // -O3 47 }; 48 } 49 50 } // end llvm namespace 51 52 #endif 53