[InstCombine] Signed saturation tests. NFC
[llvm-complete.git] / include / llvm / Support / CodeGen.h
bloba3f423e558cf2b9f94e51691d5cfabbe01268921
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 // Cannot be named PIC due to collision with -DPIC
22 enum Model { Static, PIC_, DynamicNoPIC, ROPI, RWPI, ROPI_RWPI };
25 // Code model types.
26 namespace CodeModel {
27 // Sync changes with CodeGenCWrappers.h.
28 enum Model { Tiny, Small, Kernel, Medium, Large };
31 namespace PICLevel {
32 // This is used to map -fpic/-fPIC.
33 enum Level { NotPIC=0, SmallPIC=1, BigPIC=2 };
36 namespace PIELevel {
37 enum Level { Default=0, Small=1, Large=2 };
40 // TLS models.
41 namespace TLSModel {
42 enum Model {
43 GeneralDynamic,
44 LocalDynamic,
45 InitialExec,
46 LocalExec
50 // Code generation optimization level.
51 namespace CodeGenOpt {
52 enum Level {
53 None = 0, // -O0
54 Less = 1, // -O1
55 Default = 2, // -O2, -Os
56 Aggressive = 3 // -O3
60 // Specify effect of frame pointer elimination optimization.
61 namespace FramePointer {
62 enum FP {All, NonLeaf, None};
65 } // end llvm namespace
67 #endif