Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Details | Last modification | View Log | RSS feed

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