|
clang 24.0.0git
|
CodeGenOptions - Track various options which control how the code is optimized and passed to the backend. More...
#include "clang/Basic/CodeGenOptions.h"
Classes | |
| struct | BitcodeFileToLink |
| struct | OptRemark |
| Optimization remark with an optional regular expression pattern. More... | |
Public Member Functions | |
| CodeGenOptions () | |
| const std::vector< std::string > & | getNoBuiltinFuncs () const |
| bool | hasSjLjExceptions () const |
| bool | hasSEHExceptions () const |
| bool | hasDWARFExceptions () const |
| bool | hasWasmExceptions () const |
| bool | hasEmscriptenExceptions () const |
| bool | hasProfileClangInstr () const |
| Check if Clang profile instrumenation is on. | |
| bool | hasProfileIRInstr () const |
| Check if IR level profile instrumentation is on. | |
| bool | hasProfileCSIRInstr () const |
| Check if CS IR level profile instrumentation is on. | |
| bool | hasProfileInstr () const |
| Check if any form of instrumentation is on. | |
| bool | hasProfileClangUse () const |
| Check if Clang profile use is on. | |
| bool | hasProfileIRUse () const |
| Check if IR level profile use is on. | |
| bool | hasProfileCSIRUse () const |
| Check if CSIR profile use is on. | |
| bool | hasReducedDebugInfo () const |
| Check if type and variable info should be emitted. | |
| bool | hasMaybeUnusedDebugInfo () const |
| Check if maybe unused type info should be emitted. | |
| bool | hasSanitizeCoverage () const |
| bool | hasSanitizeBinaryMetadata () const |
| void | resetNonModularOptions (StringRef ModuleFormat) |
| Reset all of the options that are not considered when building a module. | |
| bool | isLoaderReplaceableFunctionName (StringRef FuncName) const |
| bool | isOptimizedBuild () const |
| Are we building at -O1 or higher? | |
| bool | isConvertingBoolWithCmp0 () const |
| When loading a bool from a storage unit larger than i1, should it be converted to i1 by comparing to 0 or by truncating to i1? | |
| std::string | remapDebugPathPrefix (StringRef Path) const |
| Remap specified path prefix using provided DebugPrefixMap map. | |
Static Public Member Functions | |
| static StringRef | getFramePointerKindName (FramePointerKind Kind) |
| static llvm::ExceptionHandling | toExceptionHandling (ExceptionHandlingKind Kind) |
| Translate a clang ExceptionHandlingKind into the corresponding LLVM ExceptionHandling model. | |
Public Attributes | |
| std::string | BBSections |
| std::string | BinutilsVersion |
| std::string | CodeModel |
| The code model to use (-mcmodel). | |
| uint64_t | LargeDataThreshold |
| The code model-specific large data threshold to use (-mlarge-data-threshold). | |
| std::string | CoverageDataFile |
| The filename with path we use for coverage data files. | |
| std::string | CoverageNotesFile |
| The filename with path we use for coverage notes files. | |
| std::string | ProfileFilterFiles |
| Regexes separated by a semi-colon to filter the files to instrument. | |
| std::string | ProfileExcludeFiles |
| Regexes separated by a semi-colon to filter the files to not instrument. | |
| char | CoverageVersion [4] = {'0', '0', '0', '0'} |
| The version string to put into coverage files. | |
| std::string | DebugPass |
| Enable additional debugging information. | |
| std::string | DebugCompilationDir |
| The string to embed in debug information as the current working directory. | |
| std::string | CoverageCompilationDir |
| The string to embed in coverage mapping as the current working directory. | |
| std::string | DwarfDebugFlags |
| The string to embed in the debug information for the compile unit, if non-empty. | |
| std::string | RecordCommandLine |
| The string containing the commandline for the llvm.commandline metadata, if non-empty. | |
| std::string | HLSLRecordCommandLine |
| The string containing the commandline for the dx.source.args metadata, if non-empty. | |
| llvm::SmallVector< llvm::SmallString< 8 > > | HLSLParsedCommandLine |
| The vector contains parsed commandline for the dx.source.args metadata, if parsing was successful. | |
| llvm::SmallVector< std::pair< std::string, std::string >, 0 > | DebugPrefixMap |
| llvm::SmallVector< std::pair< std::string, std::string >, 0 > | CoveragePrefixMap |
| Prefix replacement map for source-based code coverage to remap source file paths in coverage mapping. | |
| std::string | FloatABI |
| The ABI to use for passing floating point arguments. | |
| std::string | DIBugsReportFilePath |
| The file to use for dumping bug report by Debugify for original debug info. | |
| llvm::DenormalMode | FPDenormalMode = llvm::DenormalMode::getIEEE() |
| The floating-point denormal mode to use. | |
| llvm::DenormalMode | FP32DenormalMode = llvm::DenormalMode::getIEEE() |
| The floating-point denormal mode to use, for float. | |
| std::string | LimitFloatPrecision |
| The float precision limit to use, if non-empty. | |
| std::vector< BitcodeFileToLink > | LinkBitcodeFiles |
| The files specified here are linked in to the module before optimizations. | |
| std::string | MainFileName |
| The user provided name for the "main file", if non-empty. | |
| 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 | SplitDwarfOutput |
| Output filename for the split debug info, not used in the skeleton CU. | |
| std::string | ObjectFilenameForDebug |
| Output filename used in the COFF debug information. | |
| llvm::Reloc::Model | RelocationModel |
| The name of the relocation model to use. | |
| std::string | TrapFuncName |
| If not an empty string, trap intrinsics are lowered to calls to this function instead of to trap instructions. | |
| std::vector< std::string > | DependentLibraries |
| A list of dependent libraries. | |
| std::vector< std::string > | LinkerOptions |
| A list of linker options to embed in the object file. | |
| std::string | InstrProfileOutput |
| Name of the profile file to use as output for -fprofile-instr-generate, -fprofile-generate, and -fcs-profile-generate. | |
| std::string | PatchableFunctionEntrySection |
| Name of the patchable function entry section with -fpatchable-function-entry. | |
| std::string | SampleProfileFile |
| Name of the profile file to use with -fprofile-sample-use. | |
| std::string | MemoryProfileOutput |
| Name of the profile file to use as output for with -fmemory-profile. | |
| std::string | MemoryProfileUsePath |
| Name of the profile file to use as input for -fmemory-profile-use. | |
| std::string | ProfileInstrumentUsePath |
| Name of the profile file to use as input for -fprofile-instr-use. | |
| std::string | ProfileRemappingFile |
| Name of the profile remapping file to apply to the profile data supplied by -fprofile-sample-use or -fprofile-instr-use. | |
| std::string | ThinLTOIndexFile |
| Name of the function summary index file to use for ThinLTO function importing. | |
| std::string | ThinLinkBitcodeFile |
| Name of a file that can optionally be written with minimized bitcode to be used as input for the ThinLTO thin link step, which only needs the summary and module symbol table (and not, e.g. | |
| std::string | SaveTempsFilePrefix |
| Prefix to use for -save-temps output. | |
| std::string | SaveDynDbgTempsFilePrefix |
| Prefix to use for -save-dynamic-debugging-temps output. | |
| std::string | OffloadBinaryToEmbedFile |
| Name of file passed with -foffload-include-binary option to forward to offloading runtime back-end for incorporating them into host-side object file. | |
| std::vector< std::string > | OffloadObjects |
| List of filenames passed in using the -fembed-offload-object option. | |
| std::string | OptRecordFile |
| The name of the file to which the backend should save YAML optimization records. | |
| std::string | OptRecordPasses |
| The regex that filters the passes that should be saved to the optimization records. | |
| std::string | OptRecordFormat |
| The format used for serializing remarks (default: YAML) | |
| std::string | SymbolPartition |
| The name of the partition that symbols are assigned to, specified with -fsymbol-partition (see https://lld.llvm.org/Partitions.html). | |
| std::string | UniqueSourceFileIdentifier |
| If non-empty, allow the compiler to assume that the given source file identifier is unique at link time. | |
| OptRemark | OptimizationRemark |
| Selected optimizations for which we should enable optimization remarks. | |
| OptRemark | OptimizationRemarkMissed |
| Selected optimizations for which we should enable missed optimization remarks. | |
| OptRemark | OptimizationRemarkAnalysis |
| Selected optimizations for which we should enable optimization analyses. | |
| SanitizerSet | SanitizeRecover |
| Set of sanitizer checks that are non-fatal (i.e. | |
| SanitizerSet | SanitizeTrap |
| Set of sanitizer checks that trap rather than diagnose. | |
| SanitizerSet | SanitizeMergeHandlers |
| Set of sanitizer checks that can merge handlers (smaller code size at the expense of debuggability). | |
| SanitizerMaskCutoffs | SanitizeSkipHotCutoffs |
| Set of thresholds in a range [0.0, 1.0]: the top hottest code responsible for the given fraction of PGO counters will be excluded from sanitization (0.0 [default] to skip none, 1.0 to skip all). | |
| SanitizerSet | SanitizeAnnotateDebugInfo |
| Set of sanitizer checks, for which the instrumentation will be annotated with extra debug info. | |
| std::optional< double > | AllowRuntimeCheckSkipHotCutoff |
| std::vector< uint8_t > | CmdArgs |
| List of backend command-line options for -fembed-bitcode. | |
| std::vector< std::string > | NoBuiltinFuncs |
| A list of all -fno-builtin-* function names (e.g., memset). | |
| std::vector< std::string > | Reciprocals |
| PointerAuthOptions | PointerAuth |
| Configuration for pointer-signing. | |
| std::string | PreferVectorWidth |
| The preferred width for auto-vectorization transforms. | |
| XRayInstrSet | XRayInstrumentationBundle |
| Set of XRay instrumentation kinds to emit. | |
| std::vector< std::string > | DefaultFunctionAttrs |
| std::vector< std::string > | PassPlugins |
| List of dynamic shared object files to be loaded as pass plugins. | |
| std::vector< std::function< void(llvm::PassBuilder &)> > | PassBuilderCallbacks |
| List of pass builder callbacks. | |
| std::vector< std::string > | TocDataVarsUserSpecified |
| List of global variables explicitly specified by the user as toc-data. | |
| std::vector< std::string > | NoTocDataVars |
| List of global variables that over-ride the toc-data default. | |
| std::vector< std::string > | SanitizeCoverageAllowlistFiles |
| Path to allowlist file specifying which objects (files, functions) should exclusively be instrumented by sanitizer coverage pass. | |
| std::string | StackProtectorGuard |
| The guard style used for stack protector to get a initial value, this value usually be gotten from TLS or get from __stack_chk_guard, or some other styles we may implement in the future. | |
| std::string | StackProtectorGuardReg |
| The TLS base register when StackProtectorGuard is "tls", or register used to store the stack canary for "sysreg". | |
| std::string | StackProtectorGuardSymbol |
| Specify a symbol to be the guard value. | |
| std::vector< std::string > | SanitizeCoverageIgnorelistFiles |
| Path to ignorelist file specifying which objects (files, functions) listed for instrumentation by sanitizer coverage pass should actually not be instrumented. | |
| std::vector< std::string > | SanitizeMetadataIgnorelistFiles |
| Path to ignorelist file specifying which objects (files, functions) listed for instrumentation by sanitizer binary metadata pass should not be instrumented. | |
| llvm::KCFIHashAlgorithm | SanitizeKcfiHash |
| Hash algorithm to use for KCFI type IDs. | |
| std::string | StackUsageFile |
| Name of the stack usage file (i.e., .su file) if user passes -fstack-usage. | |
| const char * | Argv0 = nullptr |
| Executable and command-line used to create a given CompilerInvocation. | |
| std::vector< std::string > | CommandLineArgs |
| std::optional< uint64_t > | DiagnosticsHotnessThreshold = 0 |
| The minimum hotness value a diagnostic needs in order to be included in optimization diagnostics. | |
| std::optional< uint32_t > | DiagnosticsMisExpectTolerance = 0 |
| The maximum percentage profiling weights can deviate from the expected values in order to be included in misexpect diagnostics. | |
| std::string | AsSecureLogFile |
The name of a file to use with .secure_log_unique directives. | |
| std::vector< std::string > | LoaderReplaceableFunctionNames |
| A list of functions that are replacable by the loader. | |
| std::string | MSSecureHotPatchFunctionsFile |
| The name of a file that contains functions which will be compiled for hotpatching. | |
| std::vector< std::string > | MSSecureHotPatchFunctionsList |
| A list of functions which will be compiled for hotpatching. | |
CodeGenOptions - Track various options which control how the code is optimized and passed to the backend.
Definition at line 105 of file CodeGenOptions.h.
| Enumerator | |
|---|---|
| Disabled | |
| Enabled | |
| Forced | |
Definition at line 248 of file CodeGenOptions.h.
|
strong |
Definition at line 264 of file CodeGenOptions.h.
| Enumerator | |
|---|---|
| DSH_MD5 | |
| DSH_SHA1 | |
| DSH_SHA256 | |
| DSH_NONE | |
Definition at line 150 of file CodeGenOptions.h.
| Enumerator | |
|---|---|
| Embed_Off | |
| Embed_All | |
| Embed_Bitcode | |
| Embed_Marker | |
Definition at line 132 of file CodeGenOptions.h.
|
strong |
Possible exception handling behavior.
| Enumerator | |
|---|---|
| Default | |
| None | |
| SjLj | |
| WinEH | |
| DwarfCFI | |
| Wasm | |
| Emscripten | |
Definition at line 202 of file CodeGenOptions.h.
|
strong |
| Enumerator | |
|---|---|
| None | |
| This | |
| All | |
Definition at line 139 of file CodeGenOptions.h.
| Enumerator | |
|---|---|
| Language | |
| Always | |
| Never | |
Definition at line 242 of file CodeGenOptions.h.
|
strong |
| Enumerator | |
|---|---|
| NonLeafNoReserve | |
| None | |
| Reserved | |
| NonLeaf | |
| All | |
Definition at line 174 of file CodeGenOptions.h.
| Enumerator | |
|---|---|
| IAD_ATT | |
| IAD_Intel | |
Definition at line 145 of file CodeGenOptions.h.
| Enumerator | |
|---|---|
| NormalInlining | |
| OnlyHintInlining | |
| OnlyAlwaysInlining | |
Definition at line 107 of file CodeGenOptions.h.
|
strong |
| Enumerator | |
|---|---|
| Auto | |
| ForceEnable | |
| ForceDisable | |
Definition at line 274 of file CodeGenOptions.h.
| Enumerator | |
|---|---|
| Legacy | |
| NonLegacy | |
| Mixed | |
Definition at line 113 of file CodeGenOptions.h.
| Enumerator | |
|---|---|
| RK_Missing | |
| RK_Enabled | |
| RK_EnabledEverything | |
| RK_Disabled | |
| RK_DisabledEverything | |
| RK_WithPattern | |
Definition at line 462 of file CodeGenOptions.h.
| Enumerator | |
|---|---|
| None | Trap Messages are omitted. This offers the smallest debug info size but at the cost of making traps hard to debug. |
| Basic | Trap Message is fixed per SanitizerKind. Produces smaller debug info than Detailed but is not as helpful for debugging. |
| Detailed | Trap Message includes more context (e.g. the expression being overflowed). This is more helpful for debugging but produces larger debug info than Basic. |
Definition at line 254 of file CodeGenOptions.h.
| Enumerator | |
|---|---|
| SRCK_Default | |
| SRCK_OnStack | |
| SRCK_InRegs | |
Definition at line 126 of file CodeGenOptions.h.
|
strong |
| Enumerator | |
|---|---|
| Auto | |
| Always | |
| Never | |
| Default | |
Definition at line 235 of file CodeGenOptions.h.
| Enumerator | |
|---|---|
| GeneralDynamicTLSModel | |
| LocalDynamicTLSModel | |
| InitialExecTLSModel | |
| LocalExecTLSModel | |
Definition at line 119 of file CodeGenOptions.h.
| clang::CodeGenOptions::CodeGenOptions | ( | ) |
Definition at line 14 of file CodeGenOptions.cpp.
References RelocationModel.
|
inlinestatic |
Definition at line 184 of file CodeGenOptions.h.
References All, None, NonLeaf, NonLeafNoReserve, and Reserved.
Referenced by getTrivialDefaultFunctionAttributes().
|
inline |
Definition at line 648 of file CodeGenOptions.h.
References NoBuiltinFuncs.
|
inline |
Definition at line 660 of file CodeGenOptions.h.
References DwarfCFI.
Referenced by getCPersonality(), getCPersonality(), getCXXPersonality(), getCXXPersonality(), InitializePredefinedMacros(), and initTargetOptions().
|
inline |
Definition at line 668 of file CodeGenOptions.h.
References Emscripten.
Referenced by initTargetOptions().
|
inline |
Check if maybe unused type info should be emitted.
Definition at line 716 of file CodeGenOptions.h.
|
inline |
Check if Clang profile instrumenation is on.
Definition at line 673 of file CodeGenOptions.h.
Referenced by getInstrProfOptions().
|
inline |
Check if Clang profile use is on.
Definition at line 695 of file CodeGenOptions.h.
Referenced by InitializePGOProfileMacros().
|
inline |
Check if CS IR level profile instrumentation is on.
Definition at line 684 of file CodeGenOptions.h.
|
inline |
Check if CSIR profile use is on.
Definition at line 706 of file CodeGenOptions.h.
|
inline |
Check if any form of instrumentation is on.
Definition at line 690 of file CodeGenOptions.h.
Referenced by InitializePGOProfileMacros().
|
inline |
Check if IR level profile instrumentation is on.
Definition at line 679 of file CodeGenOptions.h.
|
inline |
Check if IR level profile use is on.
Definition at line 700 of file CodeGenOptions.h.
Referenced by InitializePGOProfileMacros().
|
inline |
Check if type and variable info should be emitted.
Definition at line 711 of file CodeGenOptions.h.
|
inline |
Definition at line 728 of file CodeGenOptions.h.
Referenced by addSanitizers().
|
inline |
Definition at line 721 of file CodeGenOptions.h.
Referenced by addSanitizers(), and FixupInvocation().
|
inline |
Definition at line 656 of file CodeGenOptions.h.
References WinEH.
Referenced by getCPersonality(), getCPersonality(), getCXXPersonality(), getCXXPersonality(), getObjCPersonality(), getObjCPersonality(), InitializePredefinedMacros(), and initTargetOptions().
|
inline |
Definition at line 652 of file CodeGenOptions.h.
References SjLj.
Referenced by getCPersonality(), getCPersonality(), getCXXPersonality(), getCXXPersonality(), getObjCPersonality(), getObjCPersonality(), InitializePredefinedMacros(), and initTargetOptions().
|
inline |
Definition at line 664 of file CodeGenOptions.h.
References Wasm.
Referenced by getCXXPersonality(), getCXXPersonality(), InitializePredefinedMacros(), and initTargetOptions().
|
inline |
When loading a bool from a storage unit larger than i1, should it be converted to i1 by comparing to 0 or by truncating to i1?
Definition at line 748 of file CodeGenOptions.h.
References isOptimizedBuild(), NonZero, Strict, and Truncate.
|
inline |
Definition at line 739 of file CodeGenOptions.h.
References LoaderReplaceableFunctionNames.
|
inline |
Are we building at -O1 or higher?
Definition at line 744 of file CodeGenOptions.h.
Referenced by emitCheckHandlerCall(), and isConvertingBoolWithCmp0().
| std::string clang::CodeGenOptions::remapDebugPathPrefix | ( | StringRef | Path | ) | const |
Remap specified path prefix using provided DebugPrefixMap map.
Returns updated path or unchanged if no substitution was found.
Definition at line 54 of file CodeGenOptions.cpp.
References DebugPrefixMap.
Referenced by initTargetOptions().
| void clang::CodeGenOptions::resetNonModularOptions | ( | StringRef | ModuleFormat | ) |
Reset all of the options that are not considered when building a module.
Definition at line 23 of file CodeGenOptions.cpp.
References RelocationModel.
Referenced by clang::CompilerInvocation::resetNonModularOptions().
|
inlinestatic |
Translate a clang ExceptionHandlingKind into the corresponding LLVM ExceptionHandling model.
Definition at line 215 of file CodeGenOptions.h.
References Default, DwarfCFI, Emscripten, None, SjLj, Wasm, and WinEH.
Referenced by clang::CodeGen::CodeGenModule::Release().
| std::optional<double> clang::CodeGenOptions::AllowRuntimeCheckSkipHotCutoff |
Definition at line 529 of file CodeGenOptions.h.
Referenced by addLowerAllowCheckPass().
| const char* clang::CodeGenOptions::Argv0 = nullptr |
Executable and command-line used to create a given CompilerInvocation.
Most of the time this will be the full -cc1 command.
Definition at line 603 of file CodeGenOptions.h.
Referenced by initTargetOptions(), and makeCommonInvocationForModuleBuild().
| std::string clang::CodeGenOptions::AsSecureLogFile |
The name of a file to use with .secure_log_unique directives.
Definition at line 626 of file CodeGenOptions.h.
Referenced by initTargetOptions().
| std::string clang::CodeGenOptions::BBSections |
Definition at line 166 of file CodeGenOptions.h.
Referenced by initTargetOptions().
| std::string clang::CodeGenOptions::BinutilsVersion |
Definition at line 172 of file CodeGenOptions.h.
Referenced by initTargetOptions().
| std::vector<uint8_t> clang::CodeGenOptions::CmdArgs |
List of backend command-line options for -fembed-bitcode.
Definition at line 532 of file CodeGenOptions.h.
Referenced by createAndEmbedModuleForDynamicDebugging(), and clang::EmbedBitcode().
| std::string clang::CodeGenOptions::CodeModel |
The code model to use (-mcmodel).
Definition at line 281 of file CodeGenOptions.h.
Referenced by FixupInvocation(), and getCodeModel().
| std::vector<std::string> clang::CodeGenOptions::CommandLineArgs |
Definition at line 604 of file CodeGenOptions.h.
Referenced by initTargetOptions(), and makeCommonInvocationForModuleBuild().
| std::string clang::CodeGenOptions::CoverageCompilationDir |
The string to embed in coverage mapping as the current working directory.
Definition at line 311 of file CodeGenOptions.h.
Referenced by optimizeCWD(), and clang::dependencies::resetBenignCodeGenOptions().
| std::string clang::CodeGenOptions::CoverageDataFile |
The filename with path we use for coverage data files.
The runtime allows further manipulation with the GCOV_PREFIX and GCOV_PREFIX_STRIP environment variables.
Definition at line 290 of file CodeGenOptions.h.
Referenced by getGCOVOptions(), and clang::dependencies::resetBenignCodeGenOptions().
| std::string clang::CodeGenOptions::CoverageNotesFile |
The filename with path we use for coverage notes files.
Definition at line 293 of file CodeGenOptions.h.
Referenced by getGCOVOptions(), and clang::dependencies::resetBenignCodeGenOptions().
| llvm::SmallVector<std::pair<std::string, std::string>, 0> clang::CodeGenOptions::CoveragePrefixMap |
Prefix replacement map for source-based code coverage to remap source file paths in coverage mapping.
Definition at line 333 of file CodeGenOptions.h.
| char clang::CodeGenOptions::CoverageVersion[4] = {'0', '0', '0', '0'} |
The version string to put into coverage files.
Definition at line 302 of file CodeGenOptions.h.
Referenced by getGCOVOptions().
| std::string clang::CodeGenOptions::DebugCompilationDir |
The string to embed in debug information as the current working directory.
Definition at line 308 of file CodeGenOptions.h.
Referenced by optimizeCWD(), and clang::dependencies::resetBenignCodeGenOptions().
| std::string clang::CodeGenOptions::DebugPass |
Enable additional debugging information.
Definition at line 305 of file CodeGenOptions.h.
Referenced by setCommandLineOpts().
| llvm::SmallVector<std::pair<std::string, std::string>, 0> clang::CodeGenOptions::DebugPrefixMap |
Definition at line 329 of file CodeGenOptions.h.
Referenced by remapDebugPathPrefix().
| std::vector<std::string> clang::CodeGenOptions::DefaultFunctionAttrs |
Definition at line 550 of file CodeGenOptions.h.
Referenced by addTrivialDefaultFunctionAttributes(), and getTrivialDefaultFunctionAttributes().
| std::vector<std::string> clang::CodeGenOptions::DependentLibraries |
A list of dependent libraries.
Definition at line 390 of file CodeGenOptions.h.
| std::optional<uint64_t> clang::CodeGenOptions::DiagnosticsHotnessThreshold = 0 |
The minimum hotness value a diagnostic needs in order to be included in optimization diagnostics.
The threshold is an Optional value, which maps to one of the 3 states:
If threshold option is not specified, it is disabled by default.
Definition at line 619 of file CodeGenOptions.h.
| std::optional<uint32_t> clang::CodeGenOptions::DiagnosticsMisExpectTolerance = 0 |
The maximum percentage profiling weights can deviate from the expected values in order to be included in misexpect diagnostics.
Definition at line 623 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::DIBugsReportFilePath |
The file to use for dumping bug report by Debugify for original debug info.
Definition at line 340 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::DwarfDebugFlags |
The string to embed in the debug information for the compile unit, if non-empty.
Definition at line 315 of file CodeGenOptions.h.
Referenced by clang::dependencies::resetBenignCodeGenOptions(), and SetUpDiagnosticLog().
| std::string clang::CodeGenOptions::FloatABI |
The ABI to use for passing floating point arguments.
Definition at line 336 of file CodeGenOptions.h.
Referenced by createTargetCodeGenInfo().
| llvm::DenormalMode clang::CodeGenOptions::FP32DenormalMode = llvm::DenormalMode::getIEEE() |
The floating-point denormal mode to use, for float.
Definition at line 346 of file CodeGenOptions.h.
Referenced by addMergableDefaultFunctionAttributes(), addMergeableDefaultFunctionAttributes(), and clang::CodeGen::mergeDefaultFunctionDefinitionAttributes().
| llvm::DenormalMode clang::CodeGenOptions::FPDenormalMode = llvm::DenormalMode::getIEEE() |
The floating-point denormal mode to use.
Definition at line 343 of file CodeGenOptions.h.
Referenced by addMergableDefaultFunctionAttributes(), addMergeableDefaultFunctionAttributes(), and clang::CodeGen::mergeDefaultFunctionDefinitionAttributes().
| llvm::SmallVector<llvm::SmallString<8> > clang::CodeGenOptions::HLSLParsedCommandLine |
The vector contains parsed commandline for the dx.source.args metadata, if parsing was successful.
Definition at line 327 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::HLSLRecordCommandLine |
The string containing the commandline for the dx.source.args metadata, if non-empty.
Definition at line 323 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::InstrProfileOutput |
Name of the profile file to use as output for -fprofile-instr-generate, -fprofile-generate, and -fcs-profile-generate.
Definition at line 397 of file CodeGenOptions.h.
Referenced by getInstrProfOptions(), and getProfileGenName().
| uint64_t clang::CodeGenOptions::LargeDataThreshold |
The code model-specific large data threshold to use (-mlarge-data-threshold).
Definition at line 285 of file CodeGenOptions.h.
Referenced by FixupInvocation().
| std::string clang::CodeGenOptions::LimitFloatPrecision |
The float precision limit to use, if non-empty.
Definition at line 349 of file CodeGenOptions.h.
Referenced by setCommandLineOpts().
| std::vector<BitcodeFileToLink> clang::CodeGenOptions::LinkBitcodeFiles |
The files specified here are linked in to the module before optimizations.
Definition at line 365 of file CodeGenOptions.h.
Referenced by clang::loadLinkModules().
| std::vector<std::string> clang::CodeGenOptions::LinkerOptions |
A list of linker options to embed in the object file.
Definition at line 393 of file CodeGenOptions.h.
| std::vector<std::string> clang::CodeGenOptions::LoaderReplaceableFunctionNames |
A list of functions that are replacable by the loader.
Definition at line 629 of file CodeGenOptions.h.
Referenced by isLoaderReplaceableFunctionName().
| std::string clang::CodeGenOptions::MainFileName |
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.
Definition at line 370 of file CodeGenOptions.h.
Referenced by initTargetOptions(), and clang::dependencies::resetBenignCodeGenOptions().
| std::string clang::CodeGenOptions::MemoryProfileOutput |
Name of the profile file to use as output for with -fmemory-profile.
Definition at line 407 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::MemoryProfileUsePath |
Name of the profile file to use as input for -fmemory-profile-use.
Definition at line 410 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::MSSecureHotPatchFunctionsFile |
The name of a file that contains functions which will be compiled for hotpatching.
See -fms-secure-hotpatch-functions-file.
Definition at line 632 of file CodeGenOptions.h.
Referenced by clang::CodeGen::CodeGenModule::CodeGenModule().
| std::vector<std::string> clang::CodeGenOptions::MSSecureHotPatchFunctionsList |
A list of functions which will be compiled for hotpatching.
See -fms-secure-hotpatch-functions-list.
Definition at line 636 of file CodeGenOptions.h.
Referenced by clang::CodeGen::CodeGenModule::CodeGenModule().
| std::vector<std::string> clang::CodeGenOptions::NoBuiltinFuncs |
A list of all -fno-builtin-* function names (e.g., memset).
Definition at line 535 of file CodeGenOptions.h.
Referenced by getNoBuiltinFuncs().
| std::vector<std::string> clang::CodeGenOptions::NoTocDataVars |
List of global variables that over-ride the toc-data default.
Definition at line 562 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::ObjectFilenameForDebug |
Output filename used in the COFF debug information.
Definition at line 380 of file CodeGenOptions.h.
Referenced by initTargetOptions().
| std::string clang::CodeGenOptions::OffloadBinaryToEmbedFile |
Name of file passed with -foffload-include-binary option to forward to offloading runtime back-end for incorporating them into host-side object file.
Definition at line 437 of file CodeGenOptions.h.
| std::vector<std::string> clang::CodeGenOptions::OffloadObjects |
List of filenames passed in using the -fembed-offload-object option.
These are offloading binaries containing device images and metadata.
Definition at line 441 of file CodeGenOptions.h.
Referenced by clang::EmbedObject().
| OptRemark clang::CodeGenOptions::OptimizationRemark |
Selected optimizations for which we should enable optimization remarks.
Transformation passes whose name matches the contained (optional) regular expression (and support this feature), will emit a diagnostic whenever they perform a transformation.
Definition at line 494 of file CodeGenOptions.h.
| OptRemark clang::CodeGenOptions::OptimizationRemarkAnalysis |
Selected optimizations for which we should enable optimization analyses.
Transformation passes whose name matches the contained (optional) regular expression (and support this feature), will emit a diagnostic whenever they want to explain why they decided to apply or not apply a given transformation.
Definition at line 507 of file CodeGenOptions.h.
| OptRemark clang::CodeGenOptions::OptimizationRemarkMissed |
Selected optimizations for which we should enable missed optimization remarks.
Transformation passes whose name matches the contained (optional) regular expression (and support this feature), will emit a diagnostic whenever they tried but failed to perform a transformation.
Definition at line 500 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::OptRecordFile |
The name of the file to which the backend should save YAML optimization records.
Definition at line 445 of file CodeGenOptions.h.
Referenced by clang::reportOptRecordError().
| std::string clang::CodeGenOptions::OptRecordFormat |
The format used for serializing remarks (default: YAML)
Definition at line 452 of file CodeGenOptions.h.
Referenced by clang::reportOptRecordError().
| std::string clang::CodeGenOptions::OptRecordPasses |
The regex that filters the passes that should be saved to the optimization records.
Definition at line 449 of file CodeGenOptions.h.
Referenced by clang::reportOptRecordError().
| std::vector<std::function<void(llvm::PassBuilder &)> > clang::CodeGenOptions::PassBuilderCallbacks |
List of pass builder callbacks.
Definition at line 556 of file CodeGenOptions.h.
| std::vector<std::string> clang::CodeGenOptions::PassPlugins |
List of dynamic shared object files to be loaded as pass plugins.
Definition at line 553 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::PatchableFunctionEntrySection |
Name of the patchable function entry section with -fpatchable-function-entry.
Definition at line 401 of file CodeGenOptions.h.
| PointerAuthOptions clang::CodeGenOptions::PointerAuth |
Configuration for pointer-signing.
Definition at line 540 of file CodeGenOptions.h.
Referenced by BuildAppleKextVirtualCall(), buildBlockDescriptor(), buildGlobalBlock(), clang::CodeGen::CodeGenModule::getFunctionPointerAuthInfo(), and clang::CodeGen::CodeGenModule::getMemberFunctionPointerAuthInfo().
| std::string clang::CodeGenOptions::PreferVectorWidth |
The preferred width for auto-vectorization transforms.
This is intended to override default transforms based on the width of the architected vector registers.
Definition at line 545 of file CodeGenOptions.h.
Referenced by getTrivialDefaultFunctionAttributes().
| std::string clang::CodeGenOptions::ProfileExcludeFiles |
Regexes separated by a semi-colon to filter the files to not instrument.
Definition at line 299 of file CodeGenOptions.h.
Referenced by getGCOVOptions().
| std::string clang::CodeGenOptions::ProfileFilterFiles |
Regexes separated by a semi-colon to filter the files to instrument.
Definition at line 296 of file CodeGenOptions.h.
Referenced by getGCOVOptions().
| std::string clang::CodeGenOptions::ProfileInstrumentUsePath |
Name of the profile file to use as input for -fprofile-instr-use.
Definition at line 413 of file CodeGenOptions.h.
Referenced by clang::dependencies::resetBenignCodeGenOptions().
| std::string clang::CodeGenOptions::ProfileRemappingFile |
Name of the profile remapping file to apply to the profile data supplied by -fprofile-sample-use or -fprofile-instr-use.
Definition at line 417 of file CodeGenOptions.h.
Referenced by clang::emitBackendOutput(), and clang::dependencies::resetBenignCodeGenOptions().
| std::vector<std::string> clang::CodeGenOptions::Reciprocals |
Definition at line 537 of file CodeGenOptions.h.
Referenced by getTrivialDefaultFunctionAttributes().
| std::string clang::CodeGenOptions::RecordCommandLine |
The string containing the commandline for the llvm.commandline metadata, if non-empty.
Definition at line 319 of file CodeGenOptions.h.
| llvm::Reloc::Model clang::CodeGenOptions::RelocationModel |
The name of the relocation model to use.
Definition at line 383 of file CodeGenOptions.h.
Referenced by CodeGenOptions(), resetNonModularOptions(), shouldAssumeDSOLocal(), and shouldAssumeDSOLocal().
| std::string clang::CodeGenOptions::SampleProfileFile |
Name of the profile file to use with -fprofile-sample-use.
Definition at line 404 of file CodeGenOptions.h.
Referenced by clang::emitBackendOutput(), emitCombinerOrInitializer(), emitCopyprivateCopyFunction(), emitDestructorsFunction(), emitOutlinedFunctionPrologue(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitTaskDupFunction(), emitTaskPrivateMappingFunction(), and clang::dependencies::resetBenignCodeGenOptions().
| SanitizerSet clang::CodeGenOptions::SanitizeAnnotateDebugInfo |
Set of sanitizer checks, for which the instrumentation will be annotated with extra debug info.
Definition at line 527 of file CodeGenOptions.h.
| std::vector<std::string> clang::CodeGenOptions::SanitizeCoverageAllowlistFiles |
Path to allowlist file specifying which objects (files, functions) should exclusively be instrumented by sanitizer coverage pass.
Definition at line 567 of file CodeGenOptions.h.
Referenced by addSanitizers().
| std::vector<std::string> clang::CodeGenOptions::SanitizeCoverageIgnorelistFiles |
Path to ignorelist file specifying which objects (files, functions) listed for instrumentation by sanitizer coverage pass should actually not be instrumented.
Definition at line 586 of file CodeGenOptions.h.
Referenced by addSanitizers().
| llvm::KCFIHashAlgorithm clang::CodeGenOptions::SanitizeKcfiHash |
Hash algorithm to use for KCFI type IDs.
Definition at line 594 of file CodeGenOptions.h.
| SanitizerSet clang::CodeGenOptions::SanitizeMergeHandlers |
Set of sanitizer checks that can merge handlers (smaller code size at the expense of debuggability).
Definition at line 518 of file CodeGenOptions.h.
| std::vector<std::string> clang::CodeGenOptions::SanitizeMetadataIgnorelistFiles |
Path to ignorelist file specifying which objects (files, functions) listed for instrumentation by sanitizer binary metadata pass should not be instrumented.
Definition at line 591 of file CodeGenOptions.h.
Referenced by addSanitizers().
| SanitizerSet clang::CodeGenOptions::SanitizeRecover |
Set of sanitizer checks that are non-fatal (i.e.
execution should be continued when possible).
Definition at line 511 of file CodeGenOptions.h.
Referenced by addSanitizers().
| SanitizerMaskCutoffs clang::CodeGenOptions::SanitizeSkipHotCutoffs |
Set of thresholds in a range [0.0, 1.0]: the top hottest code responsible for the given fraction of PGO counters will be excluded from sanitization (0.0 [default] to skip none, 1.0 to skip all).
Definition at line 523 of file CodeGenOptions.h.
Referenced by addLowerAllowCheckPass().
| SanitizerSet clang::CodeGenOptions::SanitizeTrap |
Set of sanitizer checks that trap rather than diagnose.
Definition at line 514 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::SaveDynDbgTempsFilePrefix |
Prefix to use for -save-dynamic-debugging-temps output.
Definition at line 432 of file CodeGenOptions.h.
Referenced by createAndEmbedModuleForDynamicDebugging().
| std::string clang::CodeGenOptions::SaveTempsFilePrefix |
Prefix to use for -save-temps output.
Definition at line 429 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::SplitDwarfFile |
The name for the split debug info file used for the DW_AT_[GNU_]dwo_name attribute in the skeleton CU.
Definition at line 374 of file CodeGenOptions.h.
Referenced by initTargetOptions().
| std::string clang::CodeGenOptions::SplitDwarfOutput |
Output filename for the split debug info, not used in the skeleton CU.
Definition at line 377 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::StackProtectorGuard |
The guard style used for stack protector to get a initial value, this value usually be gotten from TLS or get from __stack_chk_guard, or some other styles we may implement in the future.
Definition at line 572 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::StackProtectorGuardReg |
The TLS base register when StackProtectorGuard is "tls", or register used to store the stack canary for "sysreg".
On x86 this can be "fs" or "gs". On AArch64 this can only be "sp_el0".
Definition at line 578 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::StackProtectorGuardSymbol |
Specify a symbol to be the guard value.
Definition at line 581 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::StackUsageFile |
Name of the stack usage file (i.e., .su file) if user passes -fstack-usage.
If empty, it can be implied that -fstack-usage is not passed on the command line.
Definition at line 599 of file CodeGenOptions.h.
Referenced by initTargetOptions().
| std::string clang::CodeGenOptions::SymbolPartition |
The name of the partition that symbols are assigned to, specified with -fsymbol-partition (see https://lld.llvm.org/Partitions.html).
Definition at line 456 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::ThinLinkBitcodeFile |
Name of a file that can optionally be written with minimized bitcode to be used as input for the ThinLTO thin link step, which only needs the summary and module symbol table (and not, e.g.
any debug metadata).
Definition at line 426 of file CodeGenOptions.h.
| std::string clang::CodeGenOptions::ThinLTOIndexFile |
Name of the function summary index file to use for ThinLTO function importing.
Definition at line 421 of file CodeGenOptions.h.
Referenced by clang::emitBackendOutput().
| std::vector<std::string> clang::CodeGenOptions::TocDataVarsUserSpecified |
List of global variables explicitly specified by the user as toc-data.
Definition at line 559 of file CodeGenOptions.h.
Referenced by checkAliasForTocData().
| std::string clang::CodeGenOptions::TrapFuncName |
If not an empty string, trap intrinsics are lowered to calls to this function instead of to trap instructions.
Definition at line 387 of file CodeGenOptions.h.
Referenced by addTrivialDefaultFunctionAttributes(), and getTrivialDefaultFunctionAttributes().
| std::string clang::CodeGenOptions::UniqueSourceFileIdentifier |
If non-empty, allow the compiler to assume that the given source file identifier is unique at link time.
Definition at line 460 of file CodeGenOptions.h.
| XRayInstrSet clang::CodeGenOptions::XRayInstrumentationBundle |
Set of XRay instrumentation kinds to emit.
Definition at line 548 of file CodeGenOptions.h.