clang 20.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
101 };
102
107 };
108
109 // This field stores one of the allowed values for the option
110 // -fbasic-block-sections=. The allowed values with this option are:
111 // {"all", "list=<file>", "none"}.
112 //
113 // "all" : Generate basic block sections for all basic blocks.
114 // "list=<file>": Generate basic block sections for a subset of basic blocks.
115 // The functions and the machine basic block ids are specified
116 // in the file.
117 // "none": Disable sections for basic blocks.
118 std::string BBSections;
119
120 // If set, override the default value of MCAsmInfo::BinutilsVersion. If
121 // DisableIntegratedAS is specified, the assembly output will consider GNU as
122 // support. "none" means that all ELF features can be used, regardless of
123 // binutils support.
124 std::string BinutilsVersion;
125
126 enum class FramePointerKind {
127 None, // Omit all frame pointers.
128 Reserved, // Maintain valid frame pointer chain.
129 NonLeaf, // Keep non-leaf frame pointers.
130 All, // Keep all frame pointers.
131 };
132
134 switch (Kind) {
136 return "none";
138 return "reserved";
140 return "non-leaf";
142 return "all";
143 }
144
145 llvm_unreachable("invalid FramePointerKind");
146 }
147
149 Auto, // Choose Swift async extended frame info based on deployment target.
150 Always, // Unconditionally emit Swift async extended frame info.
151 Never, // Don't emit Swift async extended frame info.
152 Default = Always,
153 };
154
156 Language, // Not specified, use language standard.
157 Always, // All loops are assumed to be finite.
158 Never, // No loop is assumed to be finite.
159 };
160
165 };
166
167 /// The code model to use (-mcmodel).
168 std::string CodeModel;
169
170 /// The code model-specific large data threshold to use
171 /// (-mlarge-data-threshold).
173
174 /// The filename with path we use for coverage data files. The runtime
175 /// allows further manipulation with the GCOV_PREFIX and GCOV_PREFIX_STRIP
176 /// environment variables.
177 std::string CoverageDataFile;
178
179 /// The filename with path we use for coverage notes files.
180 std::string CoverageNotesFile;
181
182 /// Regexes separated by a semi-colon to filter the files to instrument.
184
185 /// Regexes separated by a semi-colon to filter the files to not instrument.
187
188 /// The version string to put into coverage files.
189 char CoverageVersion[4] = {'0', '0', '0', '0'};
190
191 /// Enable additional debugging information.
192 std::string DebugPass;
193
194 /// The string to embed in debug information as the current working directory.
196
197 /// The string to embed in coverage mapping as the current working directory.
199
200 /// The string to embed in the debug information for the compile unit, if
201 /// non-empty.
202 std::string DwarfDebugFlags;
203
204 /// The string containing the commandline for the llvm.commandline metadata,
205 /// if non-empty.
206 std::string RecordCommandLine;
207
209
210 /// Prefix replacement map for source-based code coverage to remap source
211 /// file paths in coverage mapping.
213
214 /// The ABI to use for passing floating point arguments.
215 std::string FloatABI;
216
217 /// The file to use for dumping bug report by `Debugify` for original
218 /// debug info.
220
221 /// The floating-point denormal mode to use.
222 llvm::DenormalMode FPDenormalMode = llvm::DenormalMode::getIEEE();
223
224 /// The floating-point denormal mode to use, for float.
225 llvm::DenormalMode FP32DenormalMode = llvm::DenormalMode::getIEEE();
226
227 /// The float precision limit to use, if non-empty.
229
231 /// The filename of the bitcode file to link in.
232 std::string Filename;
233 /// If true, we set attributes functions in the bitcode library according to
234 /// our CodeGenOptions, much as we set attrs on functions that we generate
235 /// ourselves.
236 bool PropagateAttrs = false;
237 /// If true, we use LLVM module internalizer.
238 bool Internalize = false;
239 /// Bitwise combination of llvm::Linker::Flags, passed to the LLVM linker.
240 unsigned LinkFlags = 0;
241 };
242
243 /// The files specified here are linked in to the module before optimizations.
244 std::vector<BitcodeFileToLink> LinkBitcodeFiles;
245
246 /// The user provided name for the "main file", if non-empty. This is useful
247 /// in situations where the input file name does not match the original input
248 /// file, for example with -save-temps.
249 std::string MainFileName;
250
251 /// The name for the split debug info file used for the DW_AT_[GNU_]dwo_name
252 /// attribute in the skeleton CU.
253 std::string SplitDwarfFile;
254
255 /// Output filename for the split debug info, not used in the skeleton CU.
256 std::string SplitDwarfOutput;
257
258 /// Output filename used in the COFF debug information.
260
261 /// The name of the relocation model to use.
262 llvm::Reloc::Model RelocationModel;
263
264 /// If not an empty string, trap intrinsics are lowered to calls to this
265 /// function instead of to trap instructions.
266 std::string TrapFuncName;
267
268 /// A list of dependent libraries.
269 std::vector<std::string> DependentLibraries;
270
271 /// A list of linker options to embed in the object file.
272 std::vector<std::string> LinkerOptions;
273
274 /// Name of the profile file to use as output for -fprofile-instr-generate,
275 /// -fprofile-generate, and -fcs-profile-generate.
277
278 /// Name of the profile file to use with -fprofile-sample-use.
279 std::string SampleProfileFile;
280
281 /// Name of the profile file to use as output for with -fmemory-profile.
283
284 /// Name of the profile file to use as input for -fmemory-profile-use.
286
287 /// Name of the profile file to use as input for -fprofile-instr-use
289
290 /// Name of the profile remapping file to apply to the profile data supplied
291 /// by -fprofile-sample-use or -fprofile-instr-use.
293
294 /// Name of the function summary index file to use for ThinLTO function
295 /// importing.
296 std::string ThinLTOIndexFile;
297
298 /// Name of a file that can optionally be written with minimized bitcode
299 /// to be used as input for the ThinLTO thin link step, which only needs
300 /// the summary and module symbol table (and not, e.g. any debug metadata).
302
303 /// Prefix to use for -save-temps output.
305
306 /// Name of file passed with -fcuda-include-gpubinary option to forward to
307 /// CUDA runtime back-end for incorporating them into host-side object file.
309
310 /// List of filenames passed in using the -fembed-offload-object option. These
311 /// are offloading binaries containing device images and metadata.
312 std::vector<std::string> OffloadObjects;
313
314 /// The name of the file to which the backend should save YAML optimization
315 /// records.
316 std::string OptRecordFile;
317
318 /// The regex that filters the passes that should be saved to the optimization
319 /// records.
320 std::string OptRecordPasses;
321
322 /// The format used for serializing remarks (default: YAML)
323 std::string OptRecordFormat;
324
325 /// The name of the partition that symbols are assigned to, specified with
326 /// -fsymbol-partition (see https://lld.llvm.org/Partitions.html).
327 std::string SymbolPartition;
328
330 RK_Missing, // Remark argument not present on the command line.
331 RK_Enabled, // Remark enabled via '-Rgroup'.
332 RK_EnabledEverything, // Remark enabled via '-Reverything'.
333 RK_Disabled, // Remark disabled via '-Rno-group'.
334 RK_DisabledEverything, // Remark disabled via '-Rno-everything'.
335 RK_WithPattern, // Remark pattern specified via '-Rgroup=regexp'.
336 };
337
338 /// Optimization remark with an optional regular expression pattern.
339 struct OptRemark {
341 std::string Pattern;
342 std::shared_ptr<llvm::Regex> Regex;
343
344 /// By default, optimization remark is missing.
345 OptRemark() = default;
346
347 /// Returns true iff the optimization remark holds a valid regular
348 /// expression.
349 bool hasValidPattern() const { return Regex != nullptr; }
350
351 /// Matches the given string against the regex, if there is some.
352 bool patternMatches(StringRef String) const {
353 return hasValidPattern() && Regex->match(String);
354 }
355 };
356
357 /// Selected optimizations for which we should enable optimization remarks.
358 /// Transformation passes whose name matches the contained (optional) regular
359 /// expression (and support this feature), will emit a diagnostic whenever
360 /// they perform a transformation.
362
363 /// Selected optimizations for which we should enable missed optimization
364 /// remarks. Transformation passes whose name matches the contained (optional)
365 /// regular expression (and support this feature), will emit a diagnostic
366 /// whenever they tried but failed to perform a transformation.
368
369 /// Selected optimizations for which we should enable optimization analyses.
370 /// Transformation passes whose name matches the contained (optional) regular
371 /// expression (and support this feature), will emit a diagnostic whenever
372 /// they want to explain why they decided to apply or not apply a given
373 /// transformation.
375
376 /// Set of sanitizer checks that are non-fatal (i.e. execution should be
377 /// continued when possible).
379
380 /// Set of sanitizer checks that trap rather than diagnose.
382
383 /// Set of sanitizer checks that can merge handlers (smaller code size at
384 /// the expense of debuggability).
386
387 /// Set of thresholds in a range [0.0, 1.0]: the top hottest code responsible
388 /// for the given fraction of PGO counters will be excluded from sanitization
389 /// (0.0 [default] to skip none, 1.0 to skip all).
391
392 /// List of backend command-line options for -fembed-bitcode.
393 std::vector<uint8_t> CmdArgs;
394
395 /// A list of all -fno-builtin-* function names (e.g., memset).
396 std::vector<std::string> NoBuiltinFuncs;
397
398 std::vector<std::string> Reciprocals;
399
400 /// Configuration for pointer-signing.
402
403 /// The preferred width for auto-vectorization transforms. This is intended to
404 /// override default transforms based on the width of the architected vector
405 /// registers.
406 std::string PreferVectorWidth;
407
408 /// Set of XRay instrumentation kinds to emit.
410
411 std::vector<std::string> DefaultFunctionAttrs;
412
413 /// List of dynamic shared object files to be loaded as pass plugins.
414 std::vector<std::string> PassPlugins;
415
416 /// List of pass builder callbacks.
417 std::vector<std::function<void(llvm::PassBuilder &)>> PassBuilderCallbacks;
418
419 /// List of global variables explicitly specified by the user as toc-data.
420 std::vector<std::string> TocDataVarsUserSpecified;
421
422 /// List of global variables that over-ride the toc-data default.
423 std::vector<std::string> NoTocDataVars;
424
425 /// Path to allowlist file specifying which objects
426 /// (files, functions) should exclusively be instrumented
427 /// by sanitizer coverage pass.
428 std::vector<std::string> SanitizeCoverageAllowlistFiles;
429
430 /// The guard style used for stack protector to get a initial value, this
431 /// value usually be gotten from TLS or get from __stack_chk_guard, or some
432 /// other styles we may implement in the future.
434
435 /// The TLS base register when StackProtectorGuard is "tls", or register used
436 /// to store the stack canary for "sysreg".
437 /// On x86 this can be "fs" or "gs".
438 /// On AArch64 this can only be "sp_el0".
440
441 /// Specify a symbol to be the guard value.
443
444 /// Path to ignorelist file specifying which objects
445 /// (files, functions) listed for instrumentation by sanitizer
446 /// coverage pass should actually not be instrumented.
447 std::vector<std::string> SanitizeCoverageIgnorelistFiles;
448
449 /// Path to ignorelist file specifying which objects
450 /// (files, functions) listed for instrumentation by sanitizer
451 /// binary metadata pass should not be instrumented.
452 std::vector<std::string> SanitizeMetadataIgnorelistFiles;
453
454 /// Name of the stack usage file (i.e., .su file) if user passes
455 /// -fstack-usage. If empty, it can be implied that -fstack-usage is not
456 /// passed on the command line.
457 std::string StackUsageOutput;
458
459 /// Executable and command-line used to create a given CompilerInvocation.
460 /// Most of the time this will be the full -cc1 command.
461 const char *Argv0 = nullptr;
462 std::vector<std::string> CommandLineArgs;
463
464 /// The minimum hotness value a diagnostic needs in order to be included in
465 /// optimization diagnostics.
466 ///
467 /// The threshold is an Optional value, which maps to one of the 3 states:
468 /// 1. 0 => threshold disabled. All remarks will be printed.
469 /// 2. positive int => manual threshold by user. Remarks with hotness exceed
470 /// threshold will be printed.
471 /// 3. None => 'auto' threshold by user. The actual value is not
472 /// available at command line, but will be synced with
473 /// hotness threshold from profile summary during
474 /// compilation.
475 ///
476 /// If threshold option is not specified, it is disabled by default.
477 std::optional<uint64_t> DiagnosticsHotnessThreshold = 0;
478
479 /// The maximum percentage profiling weights can deviate from the expected
480 /// values in order to be included in misexpect diagnostics.
481 std::optional<uint32_t> DiagnosticsMisExpectTolerance = 0;
482
483 /// The name of a file to use with \c .secure_log_unique directives.
484 std::string AsSecureLogFile;
485
486public:
487 // Define accessors/mutators for code generation options of enumeration type.
488#define CODEGENOPT(Name, Bits, Default)
489#define ENUM_CODEGENOPT(Name, Type, Bits, Default) \
490 Type get##Name() const { return static_cast<Type>(Name); } \
491 void set##Name(Type Value) { Name = static_cast<unsigned>(Value); }
492#include "clang/Basic/CodeGenOptions.def"
493
495
496 const std::vector<std::string> &getNoBuiltinFuncs() const {
497 return NoBuiltinFuncs;
498 }
499
500 /// Check if Clang profile instrumenation is on.
501 bool hasProfileClangInstr() const {
502 return getProfileInstr() == ProfileClangInstr;
503 }
504
505 /// Check if IR level profile instrumentation is on.
506 bool hasProfileIRInstr() const {
507 return getProfileInstr() == ProfileIRInstr;
508 }
509
510 /// Check if CS IR level profile instrumentation is on.
511 bool hasProfileCSIRInstr() const {
512 return getProfileInstr() == ProfileCSIRInstr;
513 }
514
515 /// Check if any form of instrumentation is on.
516 bool hasProfileInstr() const { return getProfileInstr() != ProfileNone; }
517
518 /// Check if Clang profile use is on.
519 bool hasProfileClangUse() const {
520 return getProfileUse() == ProfileClangInstr;
521 }
522
523 /// Check if IR level profile use is on.
524 bool hasProfileIRUse() const {
525 return getProfileUse() == ProfileIRInstr ||
526 getProfileUse() == ProfileCSIRInstr;
527 }
528
529 /// Check if CSIR profile use is on.
530 bool hasProfileCSIRUse() const { return getProfileUse() == ProfileCSIRInstr; }
531
532 /// Check if type and variable info should be emitted.
533 bool hasReducedDebugInfo() const {
534 return getDebugInfo() >= llvm::codegenoptions::DebugInfoConstructor;
535 }
536
537 /// Check if maybe unused type info should be emitted.
539 return getDebugInfo() >= llvm::codegenoptions::UnusedTypeInfo;
540 }
541
542 // Check if any one of SanitizeCoverage* is enabled.
543 bool hasSanitizeCoverage() const {
544 return SanitizeCoverageType || SanitizeCoverageIndirectCalls ||
545 SanitizeCoverageTraceCmp || SanitizeCoverageTraceLoads ||
546 SanitizeCoverageTraceStores || SanitizeCoverageControlFlow;
547 }
548
549 // Check if any one of SanitizeBinaryMetadata* is enabled.
551 return SanitizeBinaryMetadataCovered || SanitizeBinaryMetadataAtomics ||
552 SanitizeBinaryMetadataUAR;
553 }
554
555 /// Reset all of the options that are not considered when building a
556 /// module.
557 void resetNonModularOptions(StringRef ModuleFormat);
558};
559
560} // end namespace clang
561
562#endif
enum clang::sema::@1724::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.