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