1//===--- CodeGenOptions.def - Code generation option database ----- 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 defines the code generation options. Users of this file 10// must define the CODEGENOPT macro to make use of this information. 11// Optionally, the user may also define ENUM_CODEGENOPT (for options 12// that have enumeration type and VALUE_CODEGENOPT is a code 13// generation option that describes a value rather than a flag. 14// 15//===----------------------------------------------------------------------===// 16#ifndef CODEGENOPT 17# error Define the CODEGENOPT macro to handle language options 18#endif 19 20#ifndef VALUE_CODEGENOPT 21# define VALUE_CODEGENOPT(Name, Bits, Default) \ 22CODEGENOPT(Name, Bits, Default) 23#endif 24 25#ifndef ENUM_CODEGENOPT 26# define ENUM_CODEGENOPT(Name, Type, Bits, Default) \ 27CODEGENOPT(Name, Bits, Default) 28#endif 29 30CODEGENOPT(DisableIntegratedAS, 1, 0) ///< -no-integrated-as 31ENUM_CODEGENOPT(CompressDebugSections, llvm::DebugCompressionType, 2, 32 llvm::DebugCompressionType::None) 33CODEGENOPT(RelaxELFRelocations, 1, 0) ///< -Wa,--mrelax-relocations 34CODEGENOPT(AsmVerbose , 1, 0) ///< -dA, -fverbose-asm. 35CODEGENOPT(Dwarf64 , 1, 0) ///< -gdwarf64. 36CODEGENOPT(Dwarf32 , 1, 1) ///< -gdwarf32. 37CODEGENOPT(PreserveAsmComments, 1, 1) ///< -dA, -fno-preserve-as-comments. 38CODEGENOPT(AssumeSaneOperatorNew , 1, 1) ///< implicit __attribute__((malloc)) operator new 39CODEGENOPT(Autolink , 1, 1) ///< -fno-autolink 40CODEGENOPT(ObjCAutoRefCountExceptions , 1, 0) ///< Whether ARC should be EH-safe. 41CODEGENOPT(Backchain , 1, 0) ///< -mbackchain 42CODEGENOPT(ControlFlowGuardNoChecks , 1, 0) ///< -cfguard-no-checks 43CODEGENOPT(ControlFlowGuard , 1, 0) ///< -cfguard 44CODEGENOPT(EHContGuard , 1, 0) ///< -ehcontguard 45CODEGENOPT(CXAAtExit , 1, 1) ///< Use __cxa_atexit for calling destructors. 46CODEGENOPT(RegisterGlobalDtorsWithAtExit, 1, 1) ///< Use atexit or __cxa_atexit to register global destructors. 47CODEGENOPT(CXXCtorDtorAliases, 1, 0) ///< Emit complete ctors/dtors as linker 48 ///< aliases to base ctors when possible. 49CODEGENOPT(DataSections , 1, 0) ///< Set when -fdata-sections is enabled. 50CODEGENOPT(UniqueSectionNames, 1, 1) ///< Set for -funique-section-names. 51CODEGENOPT(UniqueBasicBlockSectionNames, 1, 1) ///< Set for -funique-basic-block-section-names, 52 ///< Produce unique section names with 53 ///< basic block sections. 54CODEGENOPT(EnableAIXExtendedAltivecABI, 1, 0) ///< Set for -mabi=vec-extabi. Enables the extended Altivec ABI on AIX. 55ENUM_CODEGENOPT(FramePointer, FramePointerKind, 2, FramePointerKind::None) /// frame-pointer: all,non-leaf,none 56 57CODEGENOPT(ClearASTBeforeBackend , 1, 0) ///< Free the AST before running backend code generation. Only works with -disable-free. 58CODEGENOPT(DisableFree , 1, 0) ///< Don't free memory. 59CODEGENOPT(DiscardValueNames , 1, 0) ///< Discard Value Names from the IR (LLVMContext flag) 60CODEGENOPT(DisableLLVMPasses , 1, 0) ///< Don't run any LLVM IR passes to get 61 ///< the pristine IR generated by the 62 ///< frontend. 63CODEGENOPT(DisableLifetimeMarkers, 1, 0) ///< Don't emit any lifetime markers 64CODEGENOPT(DisableO0ImplyOptNone , 1, 0) ///< Don't annonate function with optnone at O0 65CODEGENOPT(ExperimentalStrictFloatingPoint, 1, 0) ///< Enables the new, experimental 66 ///< strict floating point. 67CODEGENOPT(EnableNoundefAttrs, 1, 0) ///< Enable emitting `noundef` attributes on IR call arguments and return values 68CODEGENOPT(LegacyPassManager, 1, 0) ///< Use the legacy pass manager. 69CODEGENOPT(DebugPassManager, 1, 0) ///< Prints debug information for the new 70 ///< pass manager. 71CODEGENOPT(DisableRedZone , 1, 0) ///< Set when -mno-red-zone is enabled. 72CODEGENOPT(EmitCallSiteInfo, 1, 0) ///< Emit call site info only in the case of 73 ///< '-g' + 'O>0' level. 74CODEGENOPT(EnableDIPreservationVerify, 1, 0) ///< Enable di preservation verify 75 ///< each (it means check 76 ///< the original debug info 77 ///< metadata preservation). 78CODEGENOPT(IndirectTlsSegRefs, 1, 0) ///< Set when -mno-tls-direct-seg-refs 79 ///< is specified. 80CODEGENOPT(DisableTailCalls , 1, 0) ///< Do not emit tail calls. 81CODEGENOPT(NoEscapingBlockTailCalls, 1, 0) ///< Do not emit tail calls from 82 ///< escaping blocks. 83CODEGENOPT(EmitDeclMetadata , 1, 0) ///< Emit special metadata indicating what 84 ///< Decl* various IR entities came from. 85 ///< Only useful when running CodeGen as a 86 ///< subroutine. 87CODEGENOPT(EmitVersionIdentMetadata , 1, 1) ///< Emit compiler version metadata. 88CODEGENOPT(EmitGcovArcs , 1, 0) ///< Emit coverage data files, aka. GCDA. 89CODEGENOPT(EmitGcovNotes , 1, 0) ///< Emit coverage "notes" files, aka GCNO. 90CODEGENOPT(EmitOpenCLArgMetadata , 1, 0) ///< Emit OpenCL kernel arg metadata. 91CODEGENOPT(EmulatedTLS , 1, 0) ///< Set by default or -f[no-]emulated-tls. 92CODEGENOPT(ExplicitEmulatedTLS , 1, 0) ///< Set if -f[no-]emulated-tls is used. 93/// Embed Bitcode mode (off/all/bitcode/marker). 94ENUM_CODEGENOPT(EmbedBitcode, EmbedBitcodeKind, 2, Embed_Off) 95CODEGENOPT(ForbidGuardVariables , 1, 0) ///< Issue errors if C++ guard variables 96 ///< are required. 97CODEGENOPT(FunctionSections , 1, 0) ///< Set when -ffunction-sections is enabled. 98CODEGENOPT(InstrumentFunctions , 1, 0) ///< Set when -finstrument-functions is 99 ///< enabled. 100CODEGENOPT(InstrumentFunctionsAfterInlining , 1, 0) ///< Set when 101 ///< -finstrument-functions-after-inlining is enabled. 102CODEGENOPT(InstrumentFunctionEntryBare , 1, 0) ///< Set when 103 ///< -finstrument-function-entry-bare is enabled. 104CODEGENOPT(CFProtectionReturn , 1, 0) ///< if -fcf-protection is 105 ///< set to full or return. 106CODEGENOPT(CFProtectionBranch , 1, 0) ///< if -fcf-protection is 107 ///< set to full or branch. 108CODEGENOPT(XRayInstrumentFunctions , 1, 0) ///< Set when -fxray-instrument is 109 ///< enabled. 110CODEGENOPT(StackSizeSection , 1, 0) ///< Set when -fstack-size-section is enabled. 111CODEGENOPT(ForceDwarfFrameSection , 1, 0) ///< Set when -fforce-dwarf-frame is 112 ///< enabled. 113 114///< Set when -fxray-always-emit-customevents is enabled. 115CODEGENOPT(XRayAlwaysEmitCustomEvents , 1, 0) 116 117///< Set when -fxray-always-emit-typedevents is enabled. 118CODEGENOPT(XRayAlwaysEmitTypedEvents , 1, 0) 119 120///< Set when -fxray-ignore-loops is enabled. 121CODEGENOPT(XRayIgnoreLoops , 1, 0) 122 123///< Set with -fno-xray-function-index to omit the index section. 124CODEGENOPT(XRayOmitFunctionIndex , 1, 0) 125 126 127///< Set the minimum number of instructions in a function to determine selective 128///< XRay instrumentation. 129VALUE_CODEGENOPT(XRayInstructionThreshold , 32, 200) 130 131///< Only instrument 1 in N functions, by dividing functions into N total groups and 132///< instrumenting only the specified group at a time. Group numbers start at 0 133///< and end at N-1. 134VALUE_CODEGENOPT(XRayTotalFunctionGroups, 32, 1) 135VALUE_CODEGENOPT(XRaySelectedFunctionGroup, 32, 0) 136 137VALUE_CODEGENOPT(PatchableFunctionEntryCount , 32, 0) ///< Number of NOPs at function entry 138VALUE_CODEGENOPT(PatchableFunctionEntryOffset , 32, 0) 139 140CODEGENOPT(InstrumentForProfiling , 1, 0) ///< Set when -pg is enabled. 141CODEGENOPT(CallFEntry , 1, 0) ///< Set when -mfentry is enabled. 142CODEGENOPT(MNopMCount , 1, 0) ///< Set when -mnop-mcount is enabled. 143CODEGENOPT(RecordMCount , 1, 0) ///< Set when -mrecord-mcount is enabled. 144CODEGENOPT(PackedStack , 1, 0) ///< Set when -mpacked-stack is enabled. 145CODEGENOPT(LessPreciseFPMAD , 1, 0) ///< Enable less precise MAD instructions to 146 ///< be generated. 147CODEGENOPT(PrepareForLTO , 1, 0) ///< Set when -flto is enabled on the 148 ///< compile step. 149CODEGENOPT(PrepareForThinLTO , 1, 0) ///< Set when -flto=thin is enabled on the 150 ///< compile step. 151CODEGENOPT(LTOUnit, 1, 0) ///< Emit IR to support LTO unit features (CFI, whole 152 ///< program vtable opt). 153CODEGENOPT(EnableSplitLTOUnit, 1, 0) ///< Enable LTO unit splitting to support 154 /// CFI and traditional whole program 155 /// devirtualization that require whole 156 /// program IR support. 157CODEGENOPT(IncrementalLinkerCompatible, 1, 0) ///< Emit an object file which can 158 ///< be used with an incremental 159 ///< linker. 160CODEGENOPT(MergeAllConstants , 1, 1) ///< Merge identical constants. 161CODEGENOPT(MergeFunctions , 1, 0) ///< Set when -fmerge-functions is enabled. 162CODEGENOPT(MSVolatile , 1, 0) ///< Set when /volatile:ms is enabled. 163CODEGENOPT(NoCommon , 1, 0) ///< Set when -fno-common or C++ is enabled. 164CODEGENOPT(NoDwarfDirectoryAsm , 1, 0) ///< Set when -fno-dwarf-directory-asm is 165 ///< enabled. 166CODEGENOPT(NoExecStack , 1, 0) ///< Set when -Wa,--noexecstack is enabled. 167CODEGENOPT(FatalWarnings , 1, 0) ///< Set when -Wa,--fatal-warnings is 168 ///< enabled. 169CODEGENOPT(NoWarn , 1, 0) ///< Set when -Wa,--no-warn is enabled. 170CODEGENOPT(EnableSegmentedStacks , 1, 0) ///< Set when -fsplit-stack is enabled. 171CODEGENOPT(NoInlineLineTables, 1, 0) ///< Whether debug info should contain 172 ///< inline line tables. 173CODEGENOPT(StackClashProtector, 1, 0) ///< Set when -fstack-clash-protection is enabled. 174CODEGENOPT(NoImplicitFloat , 1, 0) ///< Set when -mno-implicit-float is enabled. 175CODEGENOPT(NullPointerIsValid , 1, 0) ///< Assume Null pointer deference is defined. 176CODEGENOPT(OpenCLCorrectlyRoundedDivSqrt, 1, 0) ///< -cl-fp32-correctly-rounded-divide-sqrt 177CODEGENOPT(HIPCorrectlyRoundedDivSqrt, 1, 1) ///< -fno-hip-fp32-correctly-rounded-divide-sqrt 178CODEGENOPT(UniqueInternalLinkageNames, 1, 0) ///< Internal Linkage symbols get unique names. 179CODEGENOPT(SplitMachineFunctions, 1, 0) ///< Split machine functions using profile information. 180 181/// When false, this attempts to generate code as if the result of an 182/// overflowing conversion matches the overflowing behavior of a target's native 183/// float-to-int conversion instructions. 184CODEGENOPT(StrictFloatCastOverflow, 1, 1) 185 186CODEGENOPT(UniformWGSize , 1, 0) ///< -cl-uniform-work-group-size 187CODEGENOPT(NoZeroInitializedInBSS , 1, 0) ///< -fno-zero-initialized-in-bss. 188/// Method of Objective-C dispatch to use. 189ENUM_CODEGENOPT(ObjCDispatchMethod, ObjCDispatchMethodKind, 2, Legacy) 190/// Replace certain message sends with calls to ObjC runtime entrypoints 191CODEGENOPT(ObjCConvertMessagesToRuntimeCalls , 1, 1) 192CODEGENOPT(ObjCAvoidHeapifyLocalBlocks, 1, 0) 193 194VALUE_CODEGENOPT(OptimizationLevel, 2, 0) ///< The -O[0-3] option specified. 195VALUE_CODEGENOPT(OptimizeSize, 2, 0) ///< If -Os (==1) or -Oz (==2) is specified. 196 197CODEGENOPT(AtomicProfileUpdate , 1, 0) ///< Set -fprofile-update=atomic 198/// Choose profile instrumenation kind or no instrumentation. 199ENUM_CODEGENOPT(ProfileInstr, ProfileInstrKind, 2, ProfileNone) 200/// Choose profile kind for PGO use compilation. 201ENUM_CODEGENOPT(ProfileUse, ProfileInstrKind, 2, ProfileNone) 202CODEGENOPT(CoverageMapping , 1, 0) ///< Generate coverage mapping regions to 203 ///< enable code coverage analysis. 204CODEGENOPT(DumpCoverageMapping , 1, 0) ///< Dump the generated coverage mapping 205 ///< regions. 206 207 /// If -fpcc-struct-return or -freg-struct-return is specified. 208ENUM_CODEGENOPT(StructReturnConvention, StructReturnConventionKind, 2, SRCK_Default) 209 210CODEGENOPT(RelaxAll , 1, 0) ///< Relax all machine code instructions. 211CODEGENOPT(RelaxedAliasing , 1, 0) ///< Set when -fno-strict-aliasing is enabled. 212CODEGENOPT(StructPathTBAA , 1, 0) ///< Whether or not to use struct-path TBAA. 213CODEGENOPT(NewStructPathTBAA , 1, 0) ///< Whether or not to use enhanced struct-path TBAA. 214CODEGENOPT(SaveTempLabels , 1, 0) ///< Save temporary labels. 215CODEGENOPT(SanitizeAddressUseAfterScope , 1, 0) ///< Enable use-after-scope detection 216 ///< in AddressSanitizer 217ENUM_CODEGENOPT(SanitizeAddressUseAfterReturn, 218 llvm::AsanDetectStackUseAfterReturnMode, 2, 219 llvm::AsanDetectStackUseAfterReturnMode::Runtime 220 ) ///< Set detection mode for stack-use-after-return. 221CODEGENOPT(SanitizeAddressPoisonCustomArrayCookie, 1, 222 0) ///< Enable poisoning operator new[] which is not a replaceable 223 ///< global allocation function in AddressSanitizer 224CODEGENOPT(SanitizeAddressGlobalsDeadStripping, 1, 0) ///< Enable linker dead stripping 225 ///< of globals in AddressSanitizer 226CODEGENOPT(SanitizeAddressUseOdrIndicator, 1, 0) ///< Enable ODR indicator globals 227CODEGENOPT(SanitizeMemoryTrackOrigins, 2, 0) ///< Enable tracking origins in 228 ///< MemorySanitizer 229ENUM_CODEGENOPT(SanitizeAddressDtor, llvm::AsanDtorKind, 2, 230 llvm::AsanDtorKind::Global) ///< Set how ASan global 231 ///< destructors are emitted. 232CODEGENOPT(SanitizeMemoryUseAfterDtor, 1, 0) ///< Enable use-after-delete detection 233 ///< in MemorySanitizer 234CODEGENOPT(SanitizeCfiCrossDso, 1, 0) ///< Enable cross-dso support in CFI. 235CODEGENOPT(SanitizeMinimalRuntime, 1, 0) ///< Use "_minimal" sanitizer runtime for 236 ///< diagnostics. 237CODEGENOPT(SanitizeCfiICallGeneralizePointers, 1, 0) ///< Generalize pointer types in 238 ///< CFI icall function signatures 239CODEGENOPT(SanitizeCfiCanonicalJumpTables, 1, 0) ///< Make jump table symbols canonical 240 ///< instead of creating a local jump table. 241CODEGENOPT(SanitizeCoverageType, 2, 0) ///< Type of sanitizer coverage 242 ///< instrumentation. 243CODEGENOPT(SanitizeCoverageIndirectCalls, 1, 0) ///< Enable sanitizer coverage 244 ///< for indirect calls. 245CODEGENOPT(SanitizeCoverageTraceBB, 1, 0) ///< Enable basic block tracing in 246 ///< in sanitizer coverage. 247CODEGENOPT(SanitizeCoverageTraceCmp, 1, 0) ///< Enable cmp instruction tracing 248 ///< in sanitizer coverage. 249CODEGENOPT(SanitizeCoverageTraceDiv, 1, 0) ///< Enable div instruction tracing 250 ///< in sanitizer coverage. 251CODEGENOPT(SanitizeCoverageTraceGep, 1, 0) ///< Enable GEP instruction tracing 252 ///< in sanitizer coverage. 253CODEGENOPT(SanitizeCoverage8bitCounters, 1, 0) ///< Use 8-bit frequency counters 254 ///< in sanitizer coverage. 255CODEGENOPT(SanitizeCoverageTracePC, 1, 0) ///< Enable PC tracing 256 ///< in sanitizer coverage. 257CODEGENOPT(SanitizeCoverageTracePCGuard, 1, 0) ///< Enable PC tracing with guard 258 ///< in sanitizer coverage. 259CODEGENOPT(SanitizeCoverageInline8bitCounters, 1, 0) ///< Use inline 8bit counters. 260CODEGENOPT(SanitizeCoverageInlineBoolFlag, 1, 0) ///< Use inline bool flag. 261CODEGENOPT(SanitizeCoveragePCTable, 1, 0) ///< Create a PC Table. 262CODEGENOPT(SanitizeCoverageNoPrune, 1, 0) ///< Disable coverage pruning. 263CODEGENOPT(SanitizeCoverageStackDepth, 1, 0) ///< Enable max stack depth tracing 264CODEGENOPT(SanitizeStats , 1, 0) ///< Collect statistics for sanitizers. 265CODEGENOPT(SimplifyLibCalls , 1, 1) ///< Set when -fbuiltin is enabled. 266CODEGENOPT(SoftFloat , 1, 0) ///< -soft-float. 267CODEGENOPT(SpeculativeLoadHardening, 1, 0) ///< Enable speculative load hardening. 268CODEGENOPT(FineGrainedBitfieldAccesses, 1, 0) ///< Enable fine-grained bitfield accesses. 269CODEGENOPT(StrictEnums , 1, 0) ///< Optimize based on strict enum definition. 270CODEGENOPT(StrictVTablePointers, 1, 0) ///< Optimize based on the strict vtable pointers 271CODEGENOPT(TimePasses , 1, 0) ///< Set when -ftime-report or -ftime-report= is enabled. 272CODEGENOPT(TimePassesPerRun , 1, 0) ///< Set when -ftime-report=per-pass-run is enabled. 273CODEGENOPT(TimeTrace , 1, 0) ///< Set when -ftime-trace is enabled. 274VALUE_CODEGENOPT(TimeTraceGranularity, 32, 500) ///< Minimum time granularity (in microseconds), 275 ///< traced by time profiler 276CODEGENOPT(UnrollLoops , 1, 0) ///< Control whether loops are unrolled. 277CODEGENOPT(RerollLoops , 1, 0) ///< Control whether loops are rerolled. 278CODEGENOPT(NoUseJumpTables , 1, 0) ///< Set when -fno-jump-tables is enabled. 279VALUE_CODEGENOPT(UnwindTables, 2, 0) ///< Unwind tables (1) or asynchronous unwind tables (2) 280CODEGENOPT(VectorizeLoop , 1, 0) ///< Run loop vectorizer. 281CODEGENOPT(VectorizeSLP , 1, 0) ///< Run SLP vectorizer. 282CODEGENOPT(ProfileSampleAccurate, 1, 0) ///< Sample profile is accurate. 283 284/// Treat loops as finite: language, always, never. 285ENUM_CODEGENOPT(FiniteLoops, FiniteLoopsKind, 2, FiniteLoopsKind::Language) 286 287 /// Attempt to use register sized accesses to bit-fields in structures, when 288 /// possible. 289CODEGENOPT(UseRegisterSizedBitfieldAccess , 1, 0) 290 291CODEGENOPT(VerifyModule , 1, 1) ///< Control whether the module should be run 292 ///< through the LLVM Verifier. 293 294CODEGENOPT(StackRealignment , 1, 0) ///< Control whether to force stack 295 ///< realignment. 296CODEGENOPT(UseInitArray , 1, 0) ///< Control whether to use .init_array or 297 ///< .ctors. 298VALUE_CODEGENOPT(LoopAlignment , 32, 0) ///< Overrides default loop 299 ///< alignment, if not 0. 300VALUE_CODEGENOPT(StackAlignment , 32, 0) ///< Overrides default stack 301 ///< alignment, if not 0. 302VALUE_CODEGENOPT(StackProbeSize , 32, 4096) ///< Overrides default stack 303 ///< probe size, even if 0. 304VALUE_CODEGENOPT(WarnStackSize , 32, UINT_MAX) ///< Set via -fwarn-stack-size. 305CODEGENOPT(NoStackArgProbe, 1, 0) ///< Set when -mno-stack-arg-probe is used 306CODEGENOPT(DebugStrictDwarf, 1, 1) ///< Whether or not to use strict DWARF info. 307CODEGENOPT(DebugColumnInfo, 1, 0) ///< Whether or not to use column information 308 ///< in debug info. 309 310CODEGENOPT(DebugTypeExtRefs, 1, 0) ///< Whether or not debug info should contain 311 ///< external references to a PCH or module. 312 313CODEGENOPT(DebugExplicitImport, 1, 0) ///< Whether or not debug info should 314 ///< contain explicit imports for 315 ///< anonymous namespaces 316 317CODEGENOPT(SplitDwarfInlining, 1, 1) ///< Whether to include inlining info in the 318 ///< skeleton CU to allow for symbolication 319 ///< of inline stack frames without .dwo files. 320CODEGENOPT(DebugFwdTemplateParams, 1, 0) ///< Whether to emit complete 321 ///< template parameter descriptions in 322 ///< forward declarations (versus just 323 ///< including them in the name). 324ENUM_CODEGENOPT(DebugSimpleTemplateNames, codegenoptions::DebugTemplateNamesKind, 2, codegenoptions::DebugTemplateNamesKind::Full) ///< Whether to emit template parameters 325 ///< in the textual names of template 326 ///< specializations. 327 ///< Implies DebugFwdTemplateNames to 328 ///< allow decorated names to be 329 ///< reconstructed when needed. 330CODEGENOPT(EmitLLVMUseLists, 1, 0) ///< Control whether to serialize use-lists. 331 332CODEGENOPT(WholeProgramVTables, 1, 0) ///< Whether to apply whole-program 333 /// vtable optimization. 334 335CODEGENOPT(VirtualFunctionElimination, 1, 0) ///< Whether to apply the dead 336 /// virtual function elimination 337 /// optimization. 338 339/// Whether to use public LTO visibility for entities in std and stdext 340/// namespaces. This is enabled by clang-cl's /MT and /MTd flags. 341CODEGENOPT(LTOVisibilityPublicStd, 1, 0) 342 343/// The user specified number of registers to be used for integral arguments, 344/// or 0 if unspecified. 345VALUE_CODEGENOPT(NumRegisterParameters, 32, 0) 346 347/// The threshold to put data into small data section. 348VALUE_CODEGENOPT(SmallDataLimit, 32, 0) 349 350/// The lower bound for a buffer to be considered for stack protection. 351VALUE_CODEGENOPT(SSPBufferSize, 32, 0) 352 353/// The kind of generated debug info. 354ENUM_CODEGENOPT(DebugInfo, codegenoptions::DebugInfoKind, 4, codegenoptions::NoDebugInfo) 355 356/// Whether to generate macro debug info. 357CODEGENOPT(MacroDebugInfo, 1, 0) 358 359/// Tune the debug info for this debugger. 360ENUM_CODEGENOPT(DebuggerTuning, llvm::DebuggerKind, 3, 361 llvm::DebuggerKind::Default) 362 363/// Dwarf version. Version zero indicates to LLVM that no DWARF should be 364/// emitted. 365VALUE_CODEGENOPT(DwarfVersion, 3, 0) 366 367/// Whether to use experimental new variable location tracking. 368CODEGENOPT(ValueTrackingVariableLocations, 1, 0) 369 370/// Whether we should emit CodeView debug information. It's possible to emit 371/// CodeView and DWARF into the same object. 372CODEGENOPT(EmitCodeView, 1, 0) 373 374/// Whether to emit the .debug$H section containing hashes of CodeView types. 375CODEGENOPT(CodeViewGHash, 1, 0) 376 377/// The kind of inlining to perform. 378ENUM_CODEGENOPT(Inlining, InliningMethod, 2, NormalInlining) 379 380// Vector functions library to use. 381ENUM_CODEGENOPT(VecLib, VectorLibrary, 3, NoLibrary) 382 383/// The default TLS model to use. 384ENUM_CODEGENOPT(DefaultTLSModel, TLSModel, 2, GeneralDynamicTLSModel) 385 386/// Bit size of immediate TLS offsets (0 == use the default). 387VALUE_CODEGENOPT(TLSSize, 8, 0) 388 389/// The default stack protector guard offset to use. 390VALUE_CODEGENOPT(StackProtectorGuardOffset, 32, INT_MAX) 391 392/// Number of path components to strip when emitting checks. (0 == full 393/// filename) 394VALUE_CODEGENOPT(EmitCheckPathComponentsToStrip, 32, 0) 395 396/// Whether to report the hotness of the code region for optimization remarks. 397CODEGENOPT(DiagnosticsWithHotness, 1, 0) 398 399/// Whether to use direct access relocations (instead of GOT) to reference external data symbols. 400CODEGENOPT(DirectAccessExternalData, 1, 0) 401 402/// Whether we should use the undefined behaviour optimization for control flow 403/// paths that reach the end of a function without executing a required return. 404CODEGENOPT(StrictReturn, 1, 1) 405 406/// Whether emit extra debug info for sample pgo profile collection. 407CODEGENOPT(DebugInfoForProfiling, 1, 0) 408 409/// Whether emit pseudo probes for sample pgo profile collection. 410CODEGENOPT(PseudoProbeForProfiling, 1, 0) 411 412/// Whether 3-component vector type is preserved. 413CODEGENOPT(PreserveVec3Type, 1, 0) 414 415/// Whether to emit .debug_gnu_pubnames section instead of .debug_pubnames. 416CODEGENOPT(DebugNameTable, 2, 0) 417 418/// Whether to use DWARF base address specifiers in .debug_ranges. 419CODEGENOPT(DebugRangesBaseAddress, 1, 0) 420 421CODEGENOPT(NoPLT, 1, 0) 422 423/// Whether to embed source in DWARF debug line section. 424CODEGENOPT(EmbedSource, 1, 0) 425 426/// Whether to emit all vtables 427CODEGENOPT(ForceEmitVTables, 1, 0) 428 429/// Whether to emit an address-significance table into the object file. 430CODEGENOPT(Addrsig, 1, 0) 431 432/// Whether to emit unused static constants. 433CODEGENOPT(KeepStaticConsts, 1, 0) 434 435/// Whether to follow the AAPCS enforcing at least one read before storing to a volatile bitfield 436CODEGENOPT(ForceAAPCSBitfieldLoad, 1, 0) 437 438/// Assume that by-value parameters do not alias any other values. 439CODEGENOPT(PassByValueIsNoAlias, 1, 0) 440 441/// Whether to not follow the AAPCS that enforces volatile bit-field access width to be 442/// according to the field declaring type width. 443CODEGENOPT(AAPCSBitfieldWidth, 1, 1) 444 445/// Sets the IEEE bit in the expected default floating point mode register. 446/// Floating point opcodes that support exception flag gathering quiet and 447/// propagate signaling NaN inputs per IEEE 754-2008 (AMDGPU Only) 448CODEGENOPT(EmitIEEENaNCompliantInsts, 1, 1) 449 450// Whether to emit Swift Async function extended frame information: auto, 451// never, always. 452ENUM_CODEGENOPT(SwiftAsyncFramePointer, SwiftAsyncFramePointerKind, 2, 453 SwiftAsyncFramePointerKind::Always) 454 455#undef CODEGENOPT 456#undef ENUM_CODEGENOPT 457#undef VALUE_CODEGENOPT 458