opnsense-src/include/clang/CodeGen/CodeGenOptions.h

113 lines
3.9 KiB
C
Raw Normal View History

2009-11-18 09:59:57 -05:00
//===--- CodeGenOptions.h ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines the CodeGenOptions interface.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_CODEGEN_CODEGENOPTIONS_H
#define LLVM_CLANG_CODEGEN_CODEGENOPTIONS_H
#include <string>
#include <vector>
namespace clang {
/// CodeGenOptions - Track various options which control how the code
/// is optimized and passed to the backend.
class CodeGenOptions {
public:
enum InliningMethod {
NoInlining, // Perform no inlining whatsoever.
NormalInlining, // Use the standard function inlining pass.
OnlyAlwaysInlining // Only run the always inlining pass.
};
2009-12-01 06:08:04 -05:00
unsigned AsmVerbose : 1; /// -dA, -fverbose-asm.
2009-11-18 09:59:57 -05:00
unsigned DebugInfo : 1; /// Should generate deubg info (-g).
2009-12-01 06:08:04 -05:00
unsigned DisableFPElim : 1; /// Set when -fomit-frame-pointer is enabled.
2009-11-18 09:59:57 -05:00
unsigned DisableLLVMOpts : 1; /// Don't run any optimizations, for use in
/// getting .bc files that correspond to the
/// internal state before optimizations are
/// done.
unsigned DisableRedZone : 1; /// Set when -mno-red-zone is enabled.
unsigned MergeAllConstants : 1; /// Merge identical constants.
unsigned NoCommon : 1; /// Set when -fno-common or C++ is enabled.
unsigned NoImplicitFloat : 1; /// Set when -mno-implicit-float is enabled.
2009-12-01 06:08:04 -05:00
unsigned NoZeroInitializedInBSS : 1; /// -fno-zero-initialized-in-bss
2010-02-16 04:31:36 -05:00
unsigned ObjCLegacyDispatch: 1; /// Use legacy Objective-C dispatch, even with
/// 2.0 runtime.
2009-11-18 09:59:57 -05:00
unsigned OptimizationLevel : 3; /// The -O[0-4] option specified.
unsigned OptimizeSize : 1; /// If -Os is specified.
2009-12-01 06:08:04 -05:00
unsigned SoftFloat : 1; /// -soft-float.
2009-11-18 09:59:57 -05:00
unsigned TimePasses : 1; /// Set when -ftime-report is enabled.
unsigned UnitAtATime : 1; /// Unused. For mirroring GCC optimization
/// selection.
unsigned UnrollLoops : 1; /// Control whether loops are unrolled.
2009-12-01 06:08:04 -05:00
unsigned UnwindTables : 1; /// Emit unwind tables.
2009-11-18 09:59:57 -05:00
unsigned VerifyModule : 1; /// Control whether the module should be run
/// through the LLVM Verifier.
2009-12-01 06:08:04 -05:00
/// The code model to use (-mcmodel).
std::string CodeModel;
/// Enable additional debugging information.
std::string DebugPass;
2010-01-01 05:34:51 -05:00
/// The string to embed in the debug information for the compile unit, if
/// non-empty.
std::string DwarfDebugFlags;
2009-12-01 06:08:04 -05:00
/// The ABI to use for passing floating point arguments.
std::string FloatABI;
/// The float precision limit to use, if non-empty.
std::string LimitFloatPrecision;
/// The kind of inlining to perform.
2009-11-18 09:59:57 -05:00
InliningMethod Inlining;
2009-12-01 06:08:04 -05:00
/// The user provided name for the "main file", if non-empty. This is useful
/// in situations where the input file name does not match the original input
/// file, for example with -save-temps.
std::string MainFileName;
/// The name of the relocation model to use.
std::string RelocationModel;
2009-11-18 09:59:57 -05:00
public:
CodeGenOptions() {
2009-12-01 06:08:04 -05:00
AsmVerbose = 0;
DebugInfo = 0;
DisableFPElim = 0;
DisableLLVMOpts = 0;
DisableRedZone = 0;
MergeAllConstants = 1;
NoCommon = 0;
NoImplicitFloat = 0;
NoZeroInitializedInBSS = 0;
2010-02-16 04:31:36 -05:00
ObjCLegacyDispatch = 0;
2009-11-18 09:59:57 -05:00
OptimizationLevel = 0;
OptimizeSize = 0;
2009-12-01 06:08:04 -05:00
SoftFloat = 0;
TimePasses = 0;
2009-11-18 09:59:57 -05:00
UnitAtATime = 1;
2010-02-16 04:31:36 -05:00
UnrollLoops = 0;
2009-12-01 06:08:04 -05:00
UnwindTables = 0;
2009-11-18 09:59:57 -05:00
VerifyModule = 1;
2009-12-01 06:08:04 -05:00
2009-11-18 09:59:57 -05:00
Inlining = NoInlining;
2009-12-01 06:08:04 -05:00
RelocationModel = "pic";
2009-11-18 09:59:57 -05:00
}
};
} // end namespace clang
#endif