clang 21.0.0git
CodeGenOptions.h
Go to the documentation of this file.
1//===--- CodeGenOptions.h ---------------------------------------*- 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 CodeGenOptions interface.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CLANG_BASIC_CODEGENOPTIONS_H
14#define LLVM_CLANG_BASIC_CODEGENOPTIONS_H
15
20#include "llvm/ADT/FloatingPointMode.h"
21#include "llvm/Frontend/Debug/Options.h"
22#include "llvm/Frontend/Driver/CodeGenOptions.h"
23#include "llvm/Support/CodeGen.h"
24#include "llvm/Support/Regex.h"
25#include "llvm/Target/TargetOptions.h"
26#include "llvm/Transforms/Instrumentation/AddressSanitizerOptions.h"
27#include <map>
28#include <memory>
29#include <string>
30#include <vector>
31
32namespace llvm {
33class PassBuilder;
34}
35namespace clang {
36
37/// Bitfields of CodeGenOptions, split out from CodeGenOptions to ensure
38/// that this large collection of bitfields is a trivial class type.
40 friend class CompilerInvocation;
42
43public:
44#define CODEGENOPT(Name, Bits, Default) unsigned Name : Bits;
45#define ENUM_CODEGENOPT(Name, Type, Bits, Default)
46#include "clang/Basic/CodeGenOptions.def"
47
48protected:
49#define CODEGENOPT(Name, Bits, Default)
50#define ENUM_CODEGENOPT(Name, Type, Bits, Default) unsigned Name : Bits;
51#include "clang/Basic/CodeGenOptions.def"
52};
53
54/// CodeGenOptions - Track various options which control how the code
55/// is optimized and passed to the backend.
57public:
59 NormalInlining, // Use the standard function inlining pass.
60 OnlyHintInlining, // Inline only (implicitly) hinted functions.
61 OnlyAlwaysInlining // Only run the always inlining pass.
62 };
63
65 Legacy = 0,
67 Mixed = 2
68 };
69
70 enum TLSModel {
75 };
76
78 SRCK_Default, // No special option was passed.
79 SRCK_OnStack, // Small structs on the stack (-fpcc-struct-return).
80 SRCK_InRegs // Small structs in registers (-freg-struct-return).
81 };
82
84 ProfileNone, // Profile instrumentation is turned off.
85 ProfileClangInstr, // Clang instrumentation to generate execution counts
86 // to use with PGO.
87 ProfileIRInstr, // IR level PGO instrumentation in LLVM.
88 ProfileCSIRInstr, // IR level PGO context sensitive instrumentation in LLVM.
89 };
90
92 Embed_Off, // No embedded bitcode.
93 Embed_All, // Embed both bitcode and commandline in the output.
94 Embed_Bitcode, // Embed just the bitcode in the output.
95 Embed_Marker // Embed a marker as a placeholder for bitcode.
96 };
97
99 None,
100 This,
101 All,
102 };
103
107 };
108
113 };
114
115 // This field stores one of the allowed values for the option
116 // -fbasic-block-sections=. The allowed values with this option are:
117 // {"all", "list=<file>", "none"}.
118 //
119 // "all" : Generate basic block sections for all basic blocks.
120 // "list=<file>": Generate basic block sections for a subset of basic blocks.
121 // The functions and the machine basic block ids are specified
122 // in the file.
123 // "none": Disable sections for basic blocks.
124 std::string BBSections;
125
126 // If set, override the default value of MCAsmInfo::BinutilsVersion. If
127 // DisableIntegratedAS is specified, the assembly output will consider GNU as
128 // support. "none" means that all ELF features can be used, regardless of
129 // binutils support.
130 std::string BinutilsVersion;
131
132 enum class FramePointerKind {
133 None, // Omit all frame pointers.
134 Reserved, // Maintain valid frame pointer chain.
135 NonLeaf, // Keep non-leaf frame pointers.
136 All, // Keep all frame pointers.
137 };
138
140 switch (Kind) {
142 return "none";
144 return "reserved";
146 return "non-leaf";
148 return "all";
149 }
150
151 llvm_unreachable("invalid FramePointerKind");
152 }
153
155 Auto, // Choose Swift async extended frame info based on deployment target.
156 Always, // Unconditionally emit Swift async extended frame info.
157 Never, // Don't emit Swift async extended frame info.
158 Default = Always,
159 };
160
162 Language, // Not specified, use language standard.
163 Always, // All loops are assumed to be finite.
164 Never, // No loop is assumed to be finite.
165 };
166
171 };
172
173 /// The code model to use (-mcmodel).
174 std::string CodeModel;
175
176 /// The code model-specific large data threshold to use
177 /// (-mlarge-data-threshold).
179
180 /// The filename with path we use for coverage data files. The runtime
181 /// allows further manipulation with the GCOV_PREFIX and GCOV_PREFIX_STRIP
182 /// environment variables.
183 std::string CoverageDataFile;
184
185 /// The filename with path we use for coverage notes files.
186 std::string CoverageNotesFile;
187
188 /// Regexes separated by a semi-colon to filter the files to instrument.
190
191 /// Regexes separated by a semi-colon to filter the files to not instrument.
193
194 /// The version string to put into coverage files.
195 char CoverageVersion[4] = {'0', '0', '0', '0'};
196
197 /// Enable additional debugging information.
198 std::string DebugPass;
199
200 /// The string to embed in debug information as the current working directory.
202
203 /// The string to embed in coverage mapping as the current working directory.
205
206 /// The string to embed in the debug information for the compile unit, if
207 /// non-empty.
208 std::string DwarfDebugFlags;
209
210 /// The string containing the commandline for the llvm.commandline metadata,
211 /// if non-empty.
212 std::string RecordCommandLine;
213
215
216 /// Prefix replacement map for source-based code coverage to remap source
217 /// file paths in coverage mapping.
219
220 /// The ABI to use for passing floating point arguments.
221 std::string FloatABI;
222
223 /// The file to use for dumping bug report by `Debugify` for original
224 /// debug info.
226
227 /// The floating-point denormal mode to use.
228 llvm::DenormalMode FPDenormalMode = llvm::DenormalMode::getIEEE();
229
230 /// The floating-point denormal mode to use, for float.
231 llvm::DenormalMode FP32DenormalMode = llvm::DenormalMode::getIEEE();
232
233 /// The float precision limit to use, if non-empty.
235
237 /// The filename of the bitcode file to link in.
238 std::string Filename;
239 /// If true, we set attributes functions in the bitcode library according to
240 /// our CodeGenOptions, much as we set attrs on functions that we generate
241 /// ourselves.
242 bool PropagateAttrs = false;
243 /// If true, we use LLVM module internalizer.
244 bool Internalize = false;
245 /// Bitwise combination of llvm::Linker::Flags, passed to the LLVM linker.
246 unsigned LinkFlags = 0;
247 };
248
249 /// The files specified here are linked in to the module before optimizations.
250 std::vector<BitcodeFileToLink> LinkBitcodeFiles;
251
252 /// The user provided name for the "main file", if non-empty. This is useful
253 /// in situations where the input file name does not match the original input
254 /// file, for example with -save-temps.
255 std::string MainFileName;
256
257 /// The name for the split debug info file used for the DW_AT_[GNU_]dwo_name
258 /// attribute in the skeleton CU.
259 std::string SplitDwarfFile;
260
261 /// Output filename for the split debug info, not used in the skeleton CU.
262 std::string SplitDwarfOutput;
263
264 /// Output filename used in the COFF debug information.
266
267 /// The name of the relocation model to use.
268 llvm::Reloc::Model RelocationModel;
269
270 /// If not an empty string, trap intrinsics are lowered to calls to this
271 /// function instead of to trap instructions.
272 std::string TrapFuncName;
273
274 /// A list of dependent libraries.
275 std::vector<std::string> DependentLibraries;
276
277 /// A list of linker options to embed in the object file.
278 std::vector<std::string> LinkerOptions;
279
280 /// Name of the profile file to use as output for -fprofile-instr-generate,
281 /// -fprofile-generate, and -fcs-profile-generate.
283
284 /// Name of the profile file to use with -fprofile-sample-use.
285 std::string SampleProfileFile;
286
287 /// Name of the profile file to use as output for with -fmemory-profile.
289
290 /// Name of the profile file to use as input for -fmemory-profile-use.
292
293 /// Name of the profile file to use as input for -fprofile-instr-use
295
296 /// Name of the profile remapping file to apply to the profile data supplied
297 /// by -fprofile-sample-use or -fprofile-instr-use.
299
300 /// Name of the function summary index file to use for ThinLTO function
301 /// importing.
302 std::string ThinLTOIndexFile;
303
304 /// Name of a file that can optionally be written with minimized bitcode
305 /// to be used as input for the ThinLTO thin link step, which only needs
306 /// the summary and module symbol table (and not, e.g. any debug metadata).
308
309 /// Prefix to use for -save-temps output.
311
312 /// Name of file passed with -fcuda-include-gpubinary option to forward to
313 /// CUDA runtime back-end for incorporating them into host-side object file.
315
316 /// List of filenames passed in using the -fembed-offload-object option. These
317 /// are offloading binaries containing device images and metadata.
318 std::vector<std::string> OffloadObjects;
319
320 /// The name of the file to which the backend should save YAML optimization
321 /// records.
322 std::string OptRecordFile;
323
324 /// The regex that filters the passes that should be saved to the optimization
325 /// records.
326 std::string OptRecordPasses;
327
328 /// The format used for serializing remarks (default: YAML)
329 std::string OptRecordFormat;
330
331 /// The name of the partition that symbols are assigned to, specified with
332 /// -fsymbol-partition (see https://lld.llvm.org/Partitions.html).
333 std::string SymbolPartition;
334
336 RK_Missing, // Remark argument not present on the command line.
337 RK_Enabled, // Remark enabled via '-Rgroup'.
338 RK_EnabledEverything, // Remark enabled via '-Reverything'.
339 RK_Disabled, // Remark disabled via '-Rno-group'.
340 RK_DisabledEverything, // Remark disabled via '-Rno-everything'.
341 RK_WithPattern, // Remark pattern specified via '-Rgroup=regexp'.
342 };
343
344 /// Optimization remark with an optional regular expression pattern.
345 struct OptRemark {
347 std::string Pattern;
348 std::shared_ptr<llvm::Regex> Regex;
349
350 /// By default, optimization remark is missing.
351 OptRemark() = default;
352
353 /// Returns true iff the optimization remark holds a valid regular
354 /// expression.
355 bool hasValidPattern() const { return Regex != nullptr; }
356
357 /// Matches the given string against the regex, if there is some.
358 bool patternMatches(StringRef String) const {
359 return hasValidPattern() && Regex->match(String);
360 }
361 };
362
363 /// Selected optimizations for which we should enable optimization remarks.
364 /// Transformation passes whose name matches the contained (optional) regular
365 /// expression (and support this feature), will emit a diagnostic whenever
366 /// they perform a transformation.
368
369 /// Selected optimizations for which we should enable missed optimization
370 /// remarks. Transformation passes whose name matches the contained (optional)
371 /// regular expression (and support this feature), will emit a diagnostic
372 /// whenever they tried but failed to perform a transformation.
374
375 /// Selected optimizations for which we should enable optimization analyses.
376 /// Transformation passes whose name matches the contained (optional) regular
377 /// expression (and support this feature), will emit a diagnostic whenever
378 /// they want to explain why they decided to apply or not apply a given
379 /// transformation.
381
382 /// Set of sanitizer checks that are non-fatal (i.e. execution should be
383 /// continued when possible).
385
386 /// Set of sanitizer checks that trap rather than diagnose.
388
389 /// Set of sanitizer checks that can merge handlers (smaller code size at
390 /// the expense of debuggability).
392
393 /// Set of thresholds in a range [0.0, 1.0]: the top hottest code responsible
394 /// for the given fraction of PGO counters will be excluded from sanitization
395 /// (0.0 [default] to skip none, 1.0 to skip all).
397
398 /// List of backend command-line options for -fembed-bitcode.
399 std::vector<uint8_t> CmdArgs;
400
401 /// A list of all -fno-builtin-* function names (e.g., memset).
402 std::vector<std::string> NoBuiltinFuncs;
403
404 std::vector<std::string> Reciprocals;
405
406 /// Configuration for pointer-signing.
408
409 /// The preferred width for auto-vectorization transforms. This is intended to
410 /// override default transforms based on the width of the architected vector
411 /// registers.
412 std::string PreferVectorWidth;
413
414 /// Set of XRay instrumentation kinds to emit.
416
417 std::vector<std::string> DefaultFunctionAttrs;
418
419 /// List of dynamic shared object files to be loaded as pass plugins.
420 std::vector<std::string> PassPlugins;
421
422 /// List of pass builder callbacks.
423 std::vector<std::function<void(llvm::PassBuilder &)>> PassBuilderCallbacks;
424
425 /// List of global variables explicitly specified by the user as toc-data.
426 std::vector<std::string> TocDataVarsUserSpecified;
427
428 /// List of global variables that over-ride the toc-data default.
429 std::vector<std::string> NoTocDataVars;
430
431 /// Path to allowlist file specifying which objects
432 /// (files, functions) should exclusively be instrumented
433 /// by sanitizer coverage pass.
434 std::vector<std::string> SanitizeCoverageAllowlistFiles;
435
436 /// The guard style used for stack protector to get a initial value, this
437 /// value usually be gotten from TLS or get from __stack_chk_guard, or some
438 /// other styles we may implement in the future.
440
441 /// The TLS base register when StackProtectorGuard is "tls", or register used
442 /// to store the stack canary for "sysreg".
443 /// On x86 this can be "fs" or "gs".
444 /// On AArch64 this can only be "sp_el0".
446
447 /// Specify a symbol to be the guard value.
449
450 /// Path to ignorelist file specifying which objects
451 /// (files, functions) listed for instrumentation by sanitizer
452 /// coverage pass should actually not be instrumented.
453 std::vector<std::string> SanitizeCoverageIgnorelistFiles;
454
455 /// Path to ignorelist file specifying which objects
456 /// (files, functions) listed for instrumentation by sanitizer
457 /// binary metadata pass should not be instrumented.
458 std::vector<std::string> SanitizeMetadataIgnorelistFiles;
459
460 /// Name of the stack usage file (i.e., .su file) if user passes
461 /// -fstack-usage. If empty, it can be implied that -fstack-usage is not
462 /// passed on the command line.
463 std::string StackUsageOutput;
464
465 /// Executable and command-line used to create a given CompilerInvocation.
466 /// Most of the time this will be the full -cc1 command.
467 const char *Argv0 = nullptr;
468 std::vector<std::string> CommandLineArgs;
469
470 /// The minimum hotness value a diagnostic needs in order to be included in
471 /// optimization diagnostics.
472 ///
473 /// The threshold is an Optional value, which maps to one of the 3 states:
474 /// 1. 0 => threshold disabled. All remarks will be printed.
475 /// 2. positive int => manual threshold by user. Remarks with hotness exceed
476 /// threshold will be printed.
477 /// 3. None => 'auto' threshold by user. The actual value is not
478 /// available at command line, but will be synced with
479 /// hotness threshold from profile summary during
480 /// compilation.
481 ///
482 /// If threshold option is not specified, it is disabled by default.
483 std::optional<uint64_t> DiagnosticsHotnessThreshold = 0;
484
485 /// The maximum percentage profiling weights can deviate from the expected
486 /// values in order to be included in misexpect diagnostics.
487 std::optional<uint32_t> DiagnosticsMisExpectTolerance = 0;
488
489 /// The name of a file to use with \c .secure_log_unique directives.
490 std::string AsSecureLogFile;
491
492public:
493 // Define accessors/mutators for code generation options of enumeration type.
494#define CODEGENOPT(Name, Bits, Default)
495#define ENUM_CODEGENOPT(Name, Type, Bits, Default) \
496 Type get##Name() const { return static_cast<Type>(Name); } \
497 void set##Name(Type Value) { Name = static_cast<unsigned>(Value); }
498#include "clang/Basic/CodeGenOptions.def"
499
501
502 const std::vector<std::string> &getNoBuiltinFuncs() const {
503 return NoBuiltinFuncs;
504 }
505
506 /// Check if Clang profile instrumenation is on.
507 bool hasProfileClangInstr() const {
508 return getProfileInstr() == ProfileClangInstr;
509 }
510
511 /// Check if IR level profile instrumentation is on.
512 bool hasProfileIRInstr() const {
513 return getProfileInstr() == ProfileIRInstr;
514 }
515
516 /// Check if CS IR level profile instrumentation is on.
517 bool hasProfileCSIRInstr() const {
518 return getProfileInstr() == ProfileCSIRInstr;
519 }
520
521 /// Check if any form of instrumentation is on.
522 bool hasProfileInstr() const { return getProfileInstr() != ProfileNone; }
523
524 /// Check if Clang profile use is on.
525 bool hasProfileClangUse() const {
526 return getProfileUse() == ProfileClangInstr;
527 }
528
529 /// Check if IR level profile use is on.
530 bool hasProfileIRUse() const {
531 return getProfileUse() == ProfileIRInstr ||
532 getProfileUse() == ProfileCSIRInstr;
533 }
534
535 /// Check if CSIR profile use is on.
536 bool hasProfileCSIRUse() const { return getProfileUse() == ProfileCSIRInstr; }
537
538 /// Check if type and variable info should be emitted.
539 bool hasReducedDebugInfo() const {
540 return getDebugInfo() >= llvm::codegenoptions::DebugInfoConstructor;
541 }
542
543 /// Check if maybe unused type info should be emitted.
545 return getDebugInfo() >= llvm::codegenoptions::UnusedTypeInfo;
546 }
547
548 // Check if any one of SanitizeCoverage* is enabled.
549 bool hasSanitizeCoverage() const {
550 return SanitizeCoverageType || SanitizeCoverageIndirectCalls ||
551 SanitizeCoverageTraceCmp || SanitizeCoverageTraceLoads ||
552 SanitizeCoverageTraceStores || SanitizeCoverageControlFlow;
553 }
554
555 // Check if any one of SanitizeBinaryMetadata* is enabled.
557 return SanitizeBinaryMetadataCovered || SanitizeBinaryMetadataAtomics ||
558 SanitizeBinaryMetadataUAR;
559 }
560
561 /// Reset all of the options that are not considered when building a
562 /// module.
563 void resetNonModularOptions(StringRef ModuleFormat);
564};
565
566} // end namespace clang
567
568#endif
enum clang::sema::@1727::IndirectLocalPathEntry::EntryKind Kind
Defines the clang::SanitizerKind enum.
Defines the clang::XRayInstrKind enum.
Bitfields of CodeGenOptions, split out from CodeGenOptions to ensure that this large collection of bi...
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
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 StackProtectorGuardSymbol
Specify a symbol to be the guard value.
SanitizerSet SanitizeMergeHandlers
Set of sanitizer checks that can merge handlers (smaller code size at the expense of debuggability).
const std::vector< std::string > & getNoBuiltinFuncs() const
llvm::SmallVector< std::pair< std::string, std::string >, 0 > DebugPrefixMap
std::string OptRecordFile
The name of the file to which the backend should save YAML optimization records.
std::string InstrProfileOutput
Name of the profile file to use as output for -fprofile-instr-generate, -fprofile-generate,...
std::string BinutilsVersion
std::string StackProtectorGuard
The guard style used for stack protector to get a initial value, this value usually be gotten from TL...
std::vector< BitcodeFileToLink > LinkBitcodeFiles
The files specified here are linked in to the module before optimizations.
std::string RecordCommandLine
The string containing the commandline for the llvm.commandline metadata, if non-empty.
std::optional< uint64_t > DiagnosticsHotnessThreshold
The minimum hotness value a diagnostic needs in order to be included in optimization diagnostics.
bool hasProfileInstr() const
Check if any form of instrumentation is on.
bool hasProfileIRUse() const
Check if IR level profile use is on.
char CoverageVersion[4]
The version string to put into coverage files.
std::string FloatABI
The ABI to use for passing floating point arguments.
std::string ThinLinkBitcodeFile
Name of a file that can optionally be written with minimized bitcode to be used as input for the Thin...
bool hasProfileCSIRInstr() const
Check if CS IR level profile instrumentation is on.
std::vector< std::string > DependentLibraries
A list of dependent libraries.
std::string DebugPass
Enable additional debugging information.
llvm::Reloc::Model RelocationModel
The name of the relocation model to use.
llvm::DenormalMode FPDenormalMode
The floating-point denormal mode to use.
std::string CoverageNotesFile
The filename with path we use for coverage notes files.
std::string ProfileInstrumentUsePath
Name of the profile file to use as input for -fprofile-instr-use.
std::string SampleProfileFile
Name of the profile file to use with -fprofile-sample-use.
uint64_t LargeDataThreshold
The code model-specific large data threshold to use (-mlarge-data-threshold).
static StringRef getFramePointerKindName(FramePointerKind Kind)
std::string MemoryProfileOutput
Name of the profile file to use as output for with -fmemory-profile.
std::vector< std::function< void(llvm::PassBuilder &)> > PassBuilderCallbacks
List of pass builder callbacks.
std::string LimitFloatPrecision
The float precision limit to use, if non-empty.
std::string CodeModel
The code model to use (-mcmodel).
std::vector< std::string > TocDataVarsUserSpecified
List of global variables explicitly specified by the user as toc-data.
std::string CoverageDataFile
The filename with path we use for coverage data files.
std::vector< std::string > PassPlugins
List of dynamic shared object files to be loaded as pass plugins.
bool hasProfileClangInstr() const
Check if Clang profile instrumenation is on.
std::string DebugCompilationDir
The string to embed in debug information as the current working directory.
std::optional< uint32_t > DiagnosticsMisExpectTolerance
The maximum percentage profiling weights can deviate from the expected values in order to be included...
std::string StackUsageOutput
Name of the stack usage file (i.e., .su file) if user passes -fstack-usage.
std::string OptRecordPasses
The regex that filters the passes that should be saved to the optimization records.
std::vector< std::string > SanitizeCoverageAllowlistFiles
Path to allowlist file specifying which objects (files, functions) should exclusively be instrumented...
std::string SaveTempsFilePrefix
Prefix to use for -save-temps output.
XRayInstrSet XRayInstrumentationBundle
Set of XRay instrumentation kinds to emit.
std::vector< std::string > SanitizeCoverageIgnorelistFiles
Path to ignorelist file specifying which objects (files, functions) listed for instrumentation by san...
bool hasSanitizeCoverage() const
std::vector< std::string > Reciprocals
std::string MainFileName
The user provided name for the "main file", if non-empty.
std::string CudaGpuBinaryFileName
Name of file passed with -fcuda-include-gpubinary option to forward to CUDA runtime back-end for inco...
PointerAuthOptions PointerAuth
Configuration for pointer-signing.
llvm::DenormalMode FP32DenormalMode
The floating-point denormal mode to use, for float.
bool hasProfileIRInstr() const
Check if IR level profile instrumentation is on.
bool hasProfileCSIRUse() const
Check if CSIR profile use is on.
std::string CoverageCompilationDir
The string to embed in coverage mapping as the current working directory.
SanitizerSet SanitizeTrap
Set of sanitizer checks that trap rather than diagnose.
std::vector< std::string > SanitizeMetadataIgnorelistFiles
Path to ignorelist file specifying which objects (files, functions) listed for instrumentation by san...
SanitizerSet SanitizeRecover
Set of sanitizer checks that are non-fatal (i.e.
std::string ProfileExcludeFiles
Regexes separated by a semi-colon to filter the files to not instrument.
std::string AsSecureLogFile
The name of a file to use with .secure_log_unique directives.
std::string ProfileRemappingFile
Name of the profile remapping file to apply to the profile data supplied by -fprofile-sample-use or -...
bool hasReducedDebugInfo() const
Check if type and variable info should be emitted.
bool hasSanitizeBinaryMetadata() const
OptRemark OptimizationRemark
Selected optimizations for which we should enable optimization remarks.
std::string ThinLTOIndexFile
Name of the function summary index file to use for ThinLTO function importing.
const char * Argv0
Executable and command-line used to create a given CompilerInvocation.
std::string TrapFuncName
If not an empty string, trap intrinsics are lowered to calls to this function instead of to trap inst...
SanitizerMaskCutoffs SanitizeSkipHotCutoffs
Set of thresholds in a range [0.0, 1.0]: the top hottest code responsible for the given fraction of P...
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 StackProtectorGuardReg
The TLS base register when StackProtectorGuard is "tls", or register used to store the stack canary f...
std::vector< std::string > DefaultFunctionAttrs
std::vector< std::string > NoBuiltinFuncs
A list of all -fno-builtin-* function names (e.g., memset).
std::vector< uint8_t > CmdArgs
List of backend command-line options for -fembed-bitcode.
OptRemark OptimizationRemarkAnalysis
Selected optimizations for which we should enable optimization analyses.
std::vector< std::string > CommandLineArgs
std::vector< std::string > LinkerOptions
A list of linker options to embed in the object file.
std::string MemoryProfileUsePath
Name of the profile file to use as input for -fmemory-profile-use.
void resetNonModularOptions(StringRef ModuleFormat)
Reset all of the options that are not considered when building a module.
std::string OptRecordFormat
The format used for serializing remarks (default: YAML)
bool hasProfileClangUse() const
Check if Clang profile use is on.
std::vector< std::string > OffloadObjects
List of filenames passed in using the -fembed-offload-object option.
std::string SymbolPartition
The name of the partition that symbols are assigned to, specified with -fsymbol-partition (see https:...
std::vector< std::string > NoTocDataVars
List of global variables that over-ride the toc-data default.
std::string ProfileFilterFiles
Regexes separated by a semi-colon to filter the files to instrument.
bool hasMaybeUnusedDebugInfo() const
Check if maybe unused type info should be emitted.
std::string PreferVectorWidth
The preferred width for auto-vectorization transforms.
std::string ObjectFilenameForDebug
Output filename used in the COFF debug information.
std::string SplitDwarfOutput
Output filename for the split debug info, not used in the skeleton CU.
std::string DwarfDebugFlags
The string to embed in the debug information for the compile unit, if non-empty.
std::string DIBugsReportFilePath
The file to use for dumping bug report by Debugify for original debug info.
OptRemark OptimizationRemarkMissed
Selected optimizations for which we should enable missed optimization remarks.
The base class of CompilerInvocation.
Helper class for holding the data necessary to invoke the compiler.
The JSON file list parser is used to communicate input to InstallAPI.
Diagnostic wrappers for TextAPI types for error reporting.
Definition: Dominators.h:30
Optimization remark with an optional regular expression pattern.
std::shared_ptr< llvm::Regex > Regex
bool patternMatches(StringRef String) const
Matches the given string against the regex, if there is some.
OptRemark()=default
By default, optimization remark is missing.
bool hasValidPattern() const
Returns true iff the optimization remark holds a valid regular expression.