Go to the documentation of this file.
15 #ifndef LLVM_CODEGEN_MACHINEOPTIMIZATIONREMARKEMITTER_H
16 #define LLVM_CODEGEN_MACHINEOPTIMIZATIONREMARKEMITTER_H
24 class MachineBasicBlock;
25 class MachineBlockFrequencyInfo;
156 : MF(MF), MBFI(MBFI) {}
177 template <
typename T>
178 void emit(T RemarkBuilder, decltype(RemarkBuilder()) * =
nullptr) {
188 auto R = RemarkBuilder();
212 bool shouldEmitVerbose() {
return MBFI !=
nullptr; }
221 std::unique_ptr<MachineOptimizationRemarkEmitter> ORE;
231 assert(ORE &&
"pass not run yet");
This is an optimization pass for GlobalISel generic memory operations.
@ DK_MachineOptimizationRemarkMissed
virtual bool isMissedOptRemarkEnabled(StringRef PassName) const
Return true if missed optimization remarks are enabled, override to provide different implementation.
Common features for diagnostics dealing with optimization remarks that are used by machine passes.
const char * PassName
Name of the pass that triggers this report.
StringRef getPassName() const
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function.
StringRef RemarkName
Textual identifier for the remark (single-word, camel-case).
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.
@ DK_MachineOptimizationRemark
const MachineBasicBlock * getBlock() const
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic b...
@ DK_MachineOptimizationRemarkAnalysis
Represent the analysis usage information of a pass.
const Function & getFunction() const
This is the base abstract class for diagnostic reporting in the backend.
const DiagnosticHandler * getDiagHandlerPtr() const
getDiagHandlerPtr - Returns const raw pointer of DiagnosticHandler set by setDiagnosticHandler.
Used in the streaming interface as the general argument type.
Representation of each machine instruction.
This is an important class for using LLVM in a threaded context.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static DebugLoc getDebugLoc(MachineBasicBlock::instr_iterator FirstMI, MachineBasicBlock::instr_iterator LastMI)
Return the first found DebugLoc that has a DILocation, given a range of instructions.
StringRef - Represent a constant reference to a string, i.e.
static const Function * getParent(const Value *V)
virtual bool isAnalysisRemarkEnabled(StringRef PassName) const
Return true if analysis remarks are enabled, override to provide different implementation.
virtual bool isPassedOptRemarkEnabled(StringRef PassName) const
Return true if passed optimization remarks are enabled, override to provide different implementation.
LLVMRemarkStreamer * getLLVMRemarkStreamer()
The "LLVM remark streamer" used by LLVM to serialize remark diagnostics comming from IR and MIR passe...
MI-specific kinds of diagnostic Arguments.
Function & getFunction()
Return the LLVM function that this machine code represents.
bool isAnyRemarkEnabled(StringRef PassName) const
Return true if any type of remarks are enabled for this pass.
DiagnosticInfoMIROptimization(enum DiagnosticKind Kind, const char *PassName, StringRef RemarkName, const DiagnosticLocation &Loc, const MachineBasicBlock *MBB)
static bool classof(const DiagnosticInfo *DI)
static const char PassName[]
MachineArgument(StringRef Key, const MachineInstr &MI)
Print an entire MachineInstr.