clang 17.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
18#include "llvm/ADT/FloatingPointMode.h"
19#include "llvm/Frontend/Debug/Options.h"
20#include "llvm/Support/CodeGen.h"
21#include "llvm/Support/Regex.h"
22#include "llvm/Target/TargetOptions.h"
23#include "llvm/Transforms/Instrumentation/AddressSanitizerOptions.h"
24#include <map>
25#include <memory>
26#include <string>
27#include <vector>
28
29namespace clang {
30
31/// Bitfields of CodeGenOptions, split out from CodeGenOptions to ensure
32/// that this large collection of bitfields is a trivial class type.
34 friend class CompilerInvocation;
35
36public:
37#define CODEGENOPT(Name, Bits, Default) unsigned Name : Bits;
38#define ENUM_CODEGENOPT(Name, Type, Bits, Default)
39#include "clang/Basic/CodeGenOptions.def"
40
41protected:
42#define CODEGENOPT(Name, Bits, Default)
43#define ENUM_CODEGENOPT(Name, Type, Bits, Default) unsigned Name : Bits;
44#include "clang/Basic/CodeGenOptions.def"
45};
46
47/// CodeGenOptions - Track various options which control how the code
48/// is optimized and passed to the backend.
50public:
52 NormalInlining, // Use the standard function inlining pass.
53 OnlyHintInlining, // Inline only (implicitly) hinted functions.
54 OnlyAlwaysInlining // Only run the always inlining pass.
55 };
56
58 NoLibrary, // Don't use any vector library.
59 Accelerate, // Use the Accelerate framework.
60 LIBMVEC, // GLIBC vector math library.
61 MASSV, // IBM MASS vector library.
62 SVML, // Intel short vector math library.
63 SLEEF, // SLEEF SIMD Library for Evaluating Elementary Functions.
64 Darwin_libsystem_m // Use Darwin's libsytem_m vector functions.
65 };
66
68 Legacy = 0,
70 Mixed = 2
71 };
72
73 enum TLSModel {
78 };
79
81 SRCK_Default, // No special option was passed.
82 SRCK_OnStack, // Small structs on the stack (-fpcc-struct-return).
83 SRCK_InRegs // Small structs in registers (-freg-struct-return).
84 };
85
87 ProfileNone, // Profile instrumentation is turned off.
88 ProfileClangInstr, // Clang instrumentation to generate execution counts
89 // to use with PGO.
90 ProfileIRInstr, // IR level PGO instrumentation in LLVM.
91 ProfileCSIRInstr, // IR level PGO context sensitive instrumentation in LLVM.
92 };
93
95 Embed_Off, // No embedded bitcode.
96 Embed_All, // Embed both bitcode and commandline in the output.
97 Embed_Bitcode, // Embed just the bitcode in the output.
98 Embed_Marker // Embed a marker as a placeholder for bitcode.
99 };
100
104 };
105
110 };
111
112 // This field stores one of the allowed values for the option
113 // -fbasic-block-sections=. The allowed values with this option are:
114 // {"labels", "all", "list=<file>", "none"}.
115 //
116 // "labels": Only generate basic block symbols (labels) for all basic
117 // blocks, do not generate unique sections for basic blocks.
118 // Use the machine basic block id in the symbol name to
119 // associate profile info from virtual address to machine
120 // basic block.
121 // "all" : Generate basic block sections for all basic blocks.
122 // "list=<file>": Generate basic block sections for a subset of basic blocks.
123 // The functions and the machine basic block ids are specified
124 // in the file.
125 // "none": Disable sections/labels for basic blocks.
126 std::string BBSections;
127
128 // If set, override the default value of MCAsmInfo::BinutilsVersion. If
129 // DisableIntegratedAS is specified, the assembly output will consider GNU as
130 // support. "none" means that all ELF features can be used, regardless of
131 // binutils support.
132 std::string BinutilsVersion;
133
134 enum class FramePointerKind {
135 None, // Omit all frame pointers.
136 NonLeaf, // Keep non-leaf frame pointers.
137 All, // Keep all frame pointers.
138 };
139
141 switch (Kind) {
143 return "none";
145 return "non-leaf";
147 return "all";
148 }
149
150 llvm_unreachable("invalid FramePointerKind");
151 }
152
154 Auto, // Choose Swift async extended frame info based on deployment target.
155 Always, // Unconditionally emit Swift async extended frame info.
156 Never, // Don't emit Swift async extended frame info.
157 Default = Always,
158 };
159
161 Language, // Not specified, use language standard.
162 Always, // All loops are assumed to be finite.
163 Never, // No loop is assumed to be finite.
164 };
165
170 };
171
172 /// The code model to use (-mcmodel).
173 std::string CodeModel;
174
175 /// The filename with path we use for coverage data files. The runtime
176 /// allows further manipulation with the GCOV_PREFIX and GCOV_PREFIX_STRIP
177 /// environment variables.
178 std::string CoverageDataFile;
179
180 /// The filename with path we use for coverage notes files.
181 std::string CoverageNotesFile;
182
183 /// Regexes separated by a semi-colon to filter the files to instrument.
185
186 /// Regexes separated by a semi-colon to filter the files to not instrument.
188
189 /// The version string to put into coverage files.
191
192 /// Enable additional debugging information.
193 std::string DebugPass;
194
195 /// The string to embed in debug information as the current working directory.
197
198 /// The string to embed in coverage mapping as the current working directory.
200
201 /// The string to embed in the debug information for the compile unit, if
202 /// non-empty.
203 std::string DwarfDebugFlags;
204
205 /// The string containing the commandline for the llvm.commandline metadata,
206 /// if non-empty.
207 std::string RecordCommandLine;
208
210
211 /// Prefix replacement map for source-based code coverage to remap source
212 /// file paths in coverage mapping.
214
215 /// The ABI to use for passing floating point arguments.
216 std::string FloatABI;
217
218 /// The file to use for dumping bug report by `Debugify` for original
219 /// debug info.
221
222 /// The floating-point denormal mode to use.
223 llvm::DenormalMode FPDenormalMode = llvm::DenormalMode::getIEEE();
224
225 /// The floating-point denormal mode to use, for float.
226 llvm::DenormalMode FP32DenormalMode = llvm::DenormalMode::getIEEE();
227
228 /// The float precision limit to use, if non-empty.
230
232 /// The filename of the bitcode file to link in.
233 std::string Filename;
234 /// If true, we set attributes functions in the bitcode library according to
235 /// our CodeGenOptions, much as we set attrs on functions that we generate
236 /// ourselves.
237 bool PropagateAttrs = false;
238 /// If true, we use LLVM module internalizer.
239 bool Internalize = false;
240 /// Bitwise combination of llvm::Linker::Flags, passed to the LLVM linker.
241 unsigned LinkFlags = 0;
242 };
243
244 /// The files specified here are linked in to the module before optimizations.
245 std::vector<BitcodeFileToLink> LinkBitcodeFiles;
246
247 /// The user provided name for the "main file", if non-empty. This is useful
248 /// in situations where the input file name does not match the original input
249 /// file, for example with -save-temps.
250 std::string MainFileName;
251
252 /// The name for the split debug info file used for the DW_AT_[GNU_]dwo_name
253 /// attribute in the skeleton CU.
254 std::string SplitDwarfFile;
255
256 /// Output filename for the split debug info, not used in the skeleton CU.
257 std::string SplitDwarfOutput;
258
259 /// Output filename used in the COFF debug information.
261
262 /// The name of the relocation model to use.
263 llvm::Reloc::Model RelocationModel;
264
265 /// If not an empty string, trap intrinsics are lowered to calls to this
266 /// function instead of to trap instructions.
267 std::string TrapFuncName;
268
269 /// A list of dependent libraries.
270 std::vector<std::string> DependentLibraries;
271
272 /// A list of linker options to embed in the object file.
273 std::vector<std::string> LinkerOptions;
274
275 /// Name of the profile file to use as output for -fprofile-instr-generate,
276 /// -fprofile-generate, and -fcs-profile-generate.
278
279 /// Name of the profile file to use with -fprofile-sample-use.
280 std::string SampleProfileFile;
281
282 /// Name of the profile file to use as output for with -fmemory-profile.
284
285 /// Name of the profile file to use as input for -fprofile-instr-use
287
288 /// Name of the profile remapping file to apply to the profile data supplied
289 /// by -fprofile-sample-use or -fprofile-instr-use.
291
292 /// Name of the function summary index file to use for ThinLTO function
293 /// importing.
294 std::string ThinLTOIndexFile;
295
296 /// Name of a file that can optionally be written with minimized bitcode
297 /// to be used as input for the ThinLTO thin link step, which only needs
298 /// the summary and module symbol table (and not, e.g. any debug metadata).
300
301 /// Prefix to use for -save-temps output.
303
304 /// Name of file passed with -fcuda-include-gpubinary option to forward to
305 /// CUDA runtime back-end for incorporating them into host-side object file.
307
308 /// List of filenames passed in using the -fembed-offload-object option. These
309 /// are offloading binaries containing device images and metadata.
310 std::vector<std::string> OffloadObjects;
311
312 /// The name of the file to which the backend should save YAML optimization
313 /// records.
314 std::string OptRecordFile;
315
316 /// The regex that filters the passes that should be saved to the optimization
317 /// records.
318 std::string OptRecordPasses;
319
320 /// The format used for serializing remarks (default: YAML)
321 std::string OptRecordFormat;
322
323 /// The name of the partition that symbols are assigned to, specified with
324 /// -fsymbol-partition (see https://lld.llvm.org/Partitions.html).
325 std::string SymbolPartition;
326
328 RK_Missing, // Remark argument not present on the command line.
329 RK_Enabled, // Remark enabled via '-Rgroup'.
330 RK_EnabledEverything, // Remark enabled via '-Reverything'.
331 RK_Disabled, // Remark disabled via '-Rno-group'.
332 RK_DisabledEverything, // Remark disabled via '-Rno-everything'.
333 RK_WithPattern, // Remark pattern specified via '-Rgroup=regexp'.
334 };
335
336 /// Optimization remark with an optional regular expression pattern.
337 struct OptRemark {
339 std::string Pattern;
340 std::shared_ptr<llvm::Regex> Regex;
341
342 /// By default, optimization remark is missing.
343 OptRemark() = default;
344
345 /// Returns true iff the optimization remark holds a valid regular
346 /// expression.
347 bool hasValidPattern() const { return Regex != nullptr; }
348
349 /// Matches the given string against the regex, if there is some.
350 bool patternMatches(StringRef String) const {
351 return hasValidPattern() && Regex->match(String);
352 }
353 };
354
355 /// Selected optimizations for which we should enable optimization remarks.
356 /// Transformation passes whose name matches the contained (optional) regular
357 /// expression (and support this feature), will emit a diagnostic whenever
358 /// they perform a transformation.
360
361 /// Selected optimizations for which we should enable missed optimization
362 /// remarks. Transformation passes whose name matches the contained (optional)
363 /// regular expression (and support this feature), will emit a diagnostic
364 /// whenever they tried but failed to perform a transformation.
366
367 /// Selected optimizations for which we should enable optimization analyses.
368 /// Transformation passes whose name matches the contained (optional) regular
369 /// expression (and support this feature), will emit a diagnostic whenever
370 /// they want to explain why they decided to apply or not apply a given
371 /// transformation.
373
374 /// Set of sanitizer checks that are non-fatal (i.e. execution should be
375 /// continued when possible).
377
378 /// Set of sanitizer checks that trap rather than diagnose.
380
381 /// List of backend command-line options for -fembed-bitcode.
382 std::vector<uint8_t> CmdArgs;
383
384 /// A list of all -fno-builtin-* function names (e.g., memset).
385 std::vector<std::string> NoBuiltinFuncs;
386
387 std::vector<std::string> Reciprocals;
388
389 /// The preferred width for auto-vectorization transforms. This is intended to
390 /// override default transforms based on the width of the architected vector
391 /// registers.
392 std::string PreferVectorWidth;
393
394 /// Set of XRay instrumentation kinds to emit.
396
397 std::vector<std::string> DefaultFunctionAttrs;
398
399 /// List of dynamic shared object files to be loaded as pass plugins.
400 std::vector<std::string> PassPlugins;
401
402 /// Path to allowlist file specifying which objects
403 /// (files, functions) should exclusively be instrumented
404 /// by sanitizer coverage pass.
405 std::vector<std::string> SanitizeCoverageAllowlistFiles;
406
407 /// The guard style used for stack protector to get a initial value, this
408 /// value usually be gotten from TLS or get from __stack_chk_guard, or some
409 /// other styles we may implement in the future.
411
412 /// The TLS base register when StackProtectorGuard is "tls", or register used
413 /// to store the stack canary for "sysreg".
414 /// On x86 this can be "fs" or "gs".
415 /// On AArch64 this can only be "sp_el0".
417
418 /// Specify a symbol to be the guard value.
420
421 /// Path to ignorelist file specifying which objects
422 /// (files, functions) listed for instrumentation by sanitizer
423 /// coverage pass should actually not be instrumented.
424 std::vector<std::string> SanitizeCoverageIgnorelistFiles;
425
426 /// Path to ignorelist file specifying which objects
427 /// (files, functions) listed for instrumentation by sanitizer
428 /// binary metadata pass should not be instrumented.
429 std::vector<std::string> SanitizeMetadataIgnorelistFiles;
430
431 /// Name of the stack usage file (i.e., .su file) if user passes
432 /// -fstack-usage. If empty, it can be implied that -fstack-usage is not
433 /// passed on the command line.
434 std::string StackUsageOutput;
435
436 /// Executable and command-line used to create a given CompilerInvocation.
437 /// Most of the time this will be the full -cc1 command.
438 const char *Argv0 = nullptr;
439 std::vector<std::string> CommandLineArgs;
440
441 /// The minimum hotness value a diagnostic needs in order to be included in
442 /// optimization diagnostics.
443 ///
444 /// The threshold is an Optional value, which maps to one of the 3 states:
445 /// 1. 0 => threshold disabled. All remarks will be printed.
446 /// 2. positive int => manual threshold by user. Remarks with hotness exceed
447 /// threshold will be printed.
448 /// 3. None => 'auto' threshold by user. The actual value is not
449 /// available at command line, but will be synced with
450 /// hotness threshold from profile summary during
451 /// compilation.
452 ///
453 /// If threshold option is not specified, it is disabled by default.
454 std::optional<uint64_t> DiagnosticsHotnessThreshold = 0;
455
456 /// The maximum percentage profiling weights can deviate from the expected
457 /// values in order to be included in misexpect diagnostics.
458 std::optional<uint32_t> DiagnosticsMisExpectTolerance = 0;
459
460 /// The name of a file to use with \c .secure_log_unique directives.
461 std::string AsSecureLogFile;
462
463public:
464 // Define accessors/mutators for code generation options of enumeration type.
465#define CODEGENOPT(Name, Bits, Default)
466#define ENUM_CODEGENOPT(Name, Type, Bits, Default) \
467 Type get##Name() const { return static_cast<Type>(Name); } \
468 void set##Name(Type Value) { Name = static_cast<unsigned>(Value); }
469#include "clang/Basic/CodeGenOptions.def"
470
472
473 const std::vector<std::string> &getNoBuiltinFuncs() const {
474 return NoBuiltinFuncs;
475 }
476
477 /// Check if Clang profile instrumenation is on.
478 bool hasProfileClangInstr() const {
479 return getProfileInstr() == ProfileClangInstr;
480 }
481
482 /// Check if IR level profile instrumentation is on.
483 bool hasProfileIRInstr() const {
484 return getProfileInstr() == ProfileIRInstr;
485 }
486
487 /// Check if CS IR level profile instrumentation is on.
488 bool hasProfileCSIRInstr() const {
489 return getProfileInstr() == ProfileCSIRInstr;
490 }
491
492 /// Check if Clang profile use is on.
493 bool hasProfileClangUse() const {
494 return getProfileUse() == ProfileClangInstr;
495 }
496
497 /// Check if IR level profile use is on.
498 bool hasProfileIRUse() const {
499 return getProfileUse() == ProfileIRInstr ||
500 getProfileUse() == ProfileCSIRInstr;
501 }
502
503 /// Check if CSIR profile use is on.
504 bool hasProfileCSIRUse() const { return getProfileUse() == ProfileCSIRInstr; }
505
506 /// Check if type and variable info should be emitted.
507 bool hasReducedDebugInfo() const {
508 return getDebugInfo() >= llvm::codegenoptions::DebugInfoConstructor;
509 }
510
511 /// Check if maybe unused type info should be emitted.
513 return getDebugInfo() >= llvm::codegenoptions::UnusedTypeInfo;
514 }
515
516 // Check if any one of SanitizeCoverage* is enabled.
517 bool hasSanitizeCoverage() const {
518 return SanitizeCoverageType || SanitizeCoverageIndirectCalls ||
519 SanitizeCoverageTraceCmp || SanitizeCoverageTraceLoads ||
520 SanitizeCoverageTraceStores || SanitizeCoverageControlFlow;
521 }
522
523 // Check if any one of SanitizeBinaryMetadata* is enabled.
525 return SanitizeBinaryMetadataCovered || SanitizeBinaryMetadataAtomics ||
526 SanitizeBinaryMetadataUAR;
527 }
528};
529
530} // end namespace clang
531
532#endif
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.
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 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.
static StringRef getFramePointerKindName(FramePointerKind Kind)
std::string MemoryProfileOutput
Name of the profile file to use as output for with -fmemory-profile.
std::string LimitFloatPrecision
The float precision limit to use, if non-empty.
std::string CodeModel
The code model to use (-mcmodel).
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...
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...
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 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::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.
Helper class for holding the data necessary to invoke the compiler.
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.