Go to the documentation of this file.
13 #ifndef LLVM_CLANG_BASIC_CODEGENOPTIONS_H
14 #define LLVM_CLANG_BASIC_CODEGENOPTIONS_H
19 #include "llvm/ADT/FloatingPointMode.h"
20 #include "llvm/Support/CodeGen.h"
21 #include "llvm/Support/Regex.h"
22 #include "llvm/Target/TargetOptions.h"
23 #include "llvm/Transforms/Instrumentation/AddressSanitizerOptions.h"
37 #define CODEGENOPT(Name, Bits, Default) unsigned Name : Bits;
38 #define ENUM_CODEGENOPT(Name, Type, Bits, Default)
39 #include "clang/Basic/CodeGenOptions.def"
42 #define CODEGENOPT(Name, Bits, Default)
43 #define ENUM_CODEGENOPT(Name, Type, Bits, Default) unsigned Name : Bits;
44 #include "clang/Basic/CodeGenOptions.def"
428 #define CODEGENOPT(Name, Bits, Default)
429 #define ENUM_CODEGENOPT(Name, Type, Bits, Default) \
430 Type get##Name() const { return static_cast<Type>(Name); } \
431 void set##Name(Type Value) { Name = static_cast<unsigned>(Value); }
432 #include "clang/Basic/CodeGenOptions.def"
481 return SanitizeCoverageType || SanitizeCoverageIndirectCalls ||
482 SanitizeCoverageTraceCmp || SanitizeCoverageTraceLoads ||
483 SanitizeCoverageTraceStores;
std::string BinutilsVersion
const std::vector< std::string > & getNoBuiltinFuncs() const
Bitfields of CodeGenOptions, split out from CodeGenOptions to ensure that this large collection of bi...
const char * Argv0
Executable and command-line used to create a given CompilerInvocation.
SwiftAsyncFramePointerKind
std::map< std::string, std::string > CoveragePrefixMap
std::string ThinLinkBitcodeFile
Name of a file that can optionally be written with minimized bitcode to be used as input for the Thin...
std::string InstrProfileOutput
Name of the profile file to use as output for -fprofile-instr-generate, -fprofile-generate,...
std::vector< std::string > Reciprocals
SanitizerSet SanitizeRecover
Set of sanitizer checks that are non-fatal (i.e.
OptRemark OptimizationRemarkAnalysis
Selected optimizations for which we should enable optimization analyses.
bool hasMaybeUnusedDebugInfo() const
Check if maybe unused type info should be emitted.
std::string CoverageNotesFile
The filename with path we use for coverage notes files.
std::vector< std::string > CommandLineArgs
bool hasSanitizeCoverage() const
@ UnusedTypeInfo
Generate debug info for types that may be unused in the source (-fno-eliminate-unused-debug-types).
std::string DIBugsReportFilePath
The file to use for dumping bug report by Debugify for original debug info.
std::string SampleProfileFile
Name of the profile file to use with -fprofile-sample-use.
std::string SaveTempsFilePrefix
Prefix to use for -save-temps output.
std::string CodeModel
The code model to use (-mcmodel).
std::vector< std::string > RewriteMapFiles
Set of files defining the rules for the symbol rewriting.
bool hasProfileCSIRUse() const
Check if CSIR profile use is on.
std::string ObjectFilenameForDebug
Output filename used in the COFF debug information.
std::string StackProtectorGuard
The guard style used for stack protector to get a initial value, this value usually be gotten from TL...
@ DebugInfoConstructor
Limit generated debug info for classes to reduce size.
std::string DebugPass
Enable additional debugging information.
bool Internalize
If true, we use LLVM module internalizer.
std::string ProfileFilterFiles
Regexes separated by a semi-colon to filter the files to instrument.
std::string ProfileRemappingFile
Name of the profile remapping file to apply to the profile data supplied by -fprofile-sample-use or -...
std::vector< std::string > NoBuiltinFuncs
A list of all -fno-builtin-* function names (e.g., memset).
std::string SplitDwarfFile
The name for the split debug info file used for the DW_AT_[GNU_]dwo_name attribute in the skeleton CU...
std::string FloatABI
The ABI to use for passing floating point arguments.
std::vector< uint8_t > CmdArgs
List of backend command-line options for -fembed-bitcode.
std::map< std::string, std::string > DebugPrefixMap
std::string MemoryProfileOutput
Name of the profile file to use as output for with -fmemory-profile.
std::string SplitDwarfOutput
Output filename for the split debug info, not used in the skeleton CU.
std::string CoverageCompilationDir
The string to embed in coverage mapping as the current working directory.
std::string Filename
The filename of the bitcode file to link in.
OptRemark OptimizationRemarkMissed
Selected optimizations for which we should enable missed optimization remarks.
std::vector< std::string > PassPlugins
List of dynamic shared object files to be loaded as pass plugins.
bool hasProfileClangUse() const
Check if Clang profile use is on.
std::string OptRecordFormat
The format used for serializing remarks (default: YAML)
std::vector< std::string > OffloadObjects
List of filenames passed in using the -fembed-offload-object option.
std::vector< std::string > DependentLibraries
A list of dependent libraries.
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
char CoverageVersion[4]
The version string to put into coverage files.
XRayInstrSet XRayInstrumentationBundle
Set of XRay instrumentation kinds to emit.
std::string LimitFloatPrecision
The float precision limit to use, if non-empty.
std::vector< std::string > SanitizeCoverageIgnorelistFiles
Path to ignorelist file specifying which objects (files, functions) listed for instrumentation by san...
bool hasProfileIRUse() const
Check if IR level profile use is on.
llvm::Reloc::Model RelocationModel
The name of the relocation model to use.
llvm::DenormalMode FP32DenormalMode
The floating-point denormal mode to use, for float.
std::string SymbolPartition
The name of the partition that symbols are assigned to, specified with -fsymbol-partition (see https:...
std::string PreferVectorWidth
The preferred width for auto-vectorization transforms.
bool hasProfileCSIRInstr() const
Check if CS IR level profile instrumentation is on.
bool hasReducedDebugInfo() const
Check if type and variable info should be emitted.
std::string RecordCommandLine
The string containing the commandline for the llvm.commandline metadata, if non-empty.
std::string DebugCompilationDir
The string to embed in debug information as the current working directory.
bool hasProfileClangInstr() const
Check if Clang profile instrumenation is on.
std::string StackUsageOutput
Name of the stack usage file (i.e., .su file) if user passes -fstack-usage.
std::vector< std::string > DefaultFunctionAttrs
SanitizerSet SanitizeTrap
Set of sanitizer checks that trap rather than diagnose.
std::string OptRecordFile
The name of the file to which the backend should save YAML optimization records.
std::vector< BitcodeFileToLink > LinkBitcodeFiles
The files specified here are linked in to the module before optimizations.
StructReturnConventionKind
unsigned LinkFlags
Bitwise combination of llvm::Linker::Flags, passed to the LLVM linker.
Helper class for holding the data necessary to invoke the compiler.
std::string CudaGpuBinaryFileName
Name of file passed with -fcuda-include-gpubinary option to forward to CUDA runtime back-end for inco...
bool PropagateAttrs
If true, we set attributes functions in the bitcode library according to our CodeGenOptions,...
llvm::DenormalMode FPDenormalMode
The floating-point denormal mode to use.
std::string ThinLTOIndexFile
Name of the function summary index file to use for ThinLTO function importing.
std::string ProfileExcludeFiles
Regexes separated by a semi-colon to filter the files to not instrument.
std::vector< std::string > LinkerOptions
A list of linker options to embed in the object file.
std::string CoverageDataFile
The filename with path we use for coverage data files.
std::string ProfileInstrumentUsePath
Name of the profile file to use as input for -fprofile-instr-use.
bool hasProfileIRInstr() const
Check if IR level profile instrumentation is on.
std::string DwarfDebugFlags
The string to embed in the debug information for the compile unit, if non-empty.
std::string OptRecordPasses
The regex that filters the passes that should be saved to the optimization records.
Optional< uint64_t > DiagnosticsMisExpectTolerance
The maximum percentage profiling weights can deviate from the expected values in order to be included...
Optional< uint64_t > DiagnosticsHotnessThreshold
The minimum hotness value a diagnostic needs in order to be included in optimization diagnostics.
std::string StackProtectorGuardReg
The TLS base register when StackProtectorGuard is "tls", or register used to store the stack canary f...
std::string TrapFuncName
If not an empty string, trap intrinsics are lowered to calls to this function instead of to trap inst...
std::string MainFileName
The user provided name for the "main file", if non-empty.
OptRemark OptimizationRemark
Selected optimizations for which we should enable optimization remarks.
std::vector< std::string > SanitizeCoverageAllowlistFiles
Path to allowlist file specifying which objects (files, functions) should exclusively be instrumented...