Recommit [NFC] Better encapsulation of llvm::Optional Storage
[llvm-complete.git] / include / llvm / Support / CodeGen.h
blob3175b29a4dd9a6e61c783730a01f9fea15c8085f
1 //===-- llvm/Support/CodeGen.h - CodeGen Concepts ---------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file define some types which define code generation concepts. For
10 // example, relocation model.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_SUPPORT_CODEGEN_H
15 #define LLVM_SUPPORT_CODEGEN_H
17 namespace llvm {
19 // Relocation model types.
20 namespace Reloc {
21 enum Model { Static, PIC_, DynamicNoPIC, ROPI, RWPI, ROPI_RWPI };
24 // Code model types.
25 namespace CodeModel {
26 // Sync changes with CodeGenCWrappers.h.
27 enum Model { Tiny, Small, Kernel, Medium, Large };
30 namespace PICLevel {
31 // This is used to map -fpic/-fPIC.
32 enum Level { NotPIC=0, SmallPIC=1, BigPIC=2 };
35 namespace PIELevel {
36 enum Level { Default=0, Small=1, Large=2 };
39 // TLS models.
40 namespace TLSModel {
41 enum Model {
42 GeneralDynamic,
43 LocalDynamic,
44 InitialExec,
45 LocalExec
49 // Code generation optimization level.
50 namespace CodeGenOpt {
51 enum Level {
52 None = 0, // -O0
53 Less = 1, // -O1
54 Default = 2, // -O2, -Os
55 Aggressive = 3 // -O3
59 // Specify effect of frame pointer elimination optimization.
60 namespace FramePointer {
61 enum FP {All, NonLeaf, None};
64 } // end llvm namespace
66 #endif