Go to the documentation of this file.
53 unsigned Line =
DL.getLine();
54 unsigned Col =
DL.getColumn();
71 R.Args.emplace_back();
72 R.Args.back().Key =
Arg.Key;
73 R.Args.back().Val =
Arg.Val;
107 if (
Error E = Format.takeError())
108 return make_error<LLVMRemarkSetupFormatError>(
std::move(
E));
124 return make_error<LLVMRemarkSetupFormatError>(
std::move(
E));
136 return make_error<LLVMRemarkSetupPatternError>(
std::move(
E));
151 if (
Error E = Format.takeError())
152 return make_error<LLVMRemarkSetupFormatError>(
std::move(
E));
158 return make_error<LLVMRemarkSetupFormatError>(
std::move(
E));
162 std::make_unique<remarks::RemarkStreamer>(
std::move(*RemarkSerializer)));
170 return make_error<LLVMRemarkSetupPatternError>(
std::move(
E));
cl::opt< std::string > RemarksPasses("lto-pass-remarks-filter", cl::desc("Only record optimization remarks from passes whose " "names match the given regular expression"), cl::value_desc("regex"))
void setDiagnosticsHotnessThreshold(Optional< uint64_t > Threshold)
Set the minimum hotness value a diagnostic needs in order to be included in optimization diagnostics.
This is an optimization pass for GlobalISel generic memory operations.
static StringRef dropLLVMManglingEscape(StringRef Name)
If the given string begins with the GlobalValue name mangling escape character '\1',...
@ DK_MachineOptimizationRemarkMissed
void setLLVMRemarkStreamer(std::unique_ptr< LLVMRemarkStreamer > RemarkStreamer)
StringRef getPassName() const
cl::opt< std::string > RemarksFilename("lto-pass-remarks-output", cl::desc("Output filename for pass remarks"), cl::value_desc("filename"))
static ErrorSuccess success()
Create a success value.
remarks::RemarkStreamer * getMainRemarkStreamer()
The "main remark streamer" used by all the specialized remark streamers.
@ DK_OptimizationRemarkAnalysisFPCommute
cl::opt< Optional< uint64_t >, false, remarks::HotnessThresholdParser > RemarksHotnessThreshold("lto-pass-remarks-hotness-threshold", cl::desc("Minimum profile count required for an " "optimization remark to be output." " Use 'auto' to apply the threshold from profile summary."), cl::value_desc("uint or 'auto'"), cl::init(0), cl::Hidden)
StringRef getRemarkName() const
cl::opt< bool > RemarksWithHotness("lto-pass-remarks-with-hotness", cl::desc("With PGO, include profile count in optimization remarks"), cl::Hidden)
Tagged union holding either a T or a Error.
Common features for diagnostics dealing with optimization remarks that are used by both IR and MIR pa...
DiagnosticKind
Defines the different supported kind of a diagnostic.
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
@ DK_MachineOptimizationRemark
Expected< std::unique_ptr< ToolOutputFile > > setupLLVMOptimizationRemarks(LLVMContext &Context, StringRef RemarksFilename, StringRef RemarksPasses, StringRef RemarksFormat, bool RemarksWithHotness, Optional< uint64_t > RemarksHotnessThreshold=0)
Setup optimization remarks that output to a file.
@ DK_MachineOptimizationRemarkAnalysis
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Optional< uint64_t > getHotness() const
Error errorCodeToError(std::error_code EC)
Helper for converting an std::error_code to a Error.
const Function & getFunction() const
@ DK_OptimizationRemarkAnalysis
This class implements an extremely fast bulk output stream that can only output to a stream.
@ DK_OptimizationRemarkMissed
cl::opt< std::string > RemarksFormat("lto-pass-remarks-format", cl::desc("The format used for serializing remarks (default: YAML)"), cl::value_desc("format"), cl::init("yaml"))
@ OF_TextWithCRLF
The file should be opened in text mode and use a carriage linefeed '\r '.
Used in the streaming interface as the general argument type.
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
This is an important class for using LLVM in a threaded context.
void setDiagnosticsHotnessRequested(bool Requested)
Set if a code hotness metric should be included in optimization diagnostics.
void setMainRemarkStreamer(std::unique_ptr< remarks::RemarkStreamer > MainRemarkStreamer)
@ DK_OptimizationRemarkAnalysisAliasing
StringRef - Represent a constant reference to a string, i.e.
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
StringRef getName() const
Return a constant reference to the value's name.
Lightweight error class with error context and mandatory checking.
Error takeError()
Take ownership of the stored error.
void getLocation(StringRef &RelativePath, unsigned &Line, unsigned &Column) const
Return location information for this diagnostic in three parts: the relative source file path,...
ArrayRef< Argument > getArgs() const