31 MI.
print(OS,
false,
true);
39 return MBFI->getBlockProfileCount(&MBB);
42 void MachineOptimizationRemarkEmitter::computeHotness(
51 auto &OptDiag = cast<DiagnosticInfoMIROptimization>(OptDiagCommon);
52 computeHotness(OptDiag);
58 if (OptDiag.getHotness() &&
70 if (!OptDiag.isVerbose() || shouldEmitVerbose())
85 MBFI = &getAnalysis<LazyMachineBlockFrequencyInfoPass>().getBFI();
89 ORE = llvm::make_unique<MachineOptimizationRemarkEmitter>(MF, MBFI);
101 static const char ore_name[] =
"Machine Optimization Remark Emitter";
102 #define ORE_NAME "machine-opt-remark-emitter"
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function. ...
bool getDiagnosticsHotnessRequested() const
Return if a code hotness metric should be included in optimization diagnostics.
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic b...
const Function * getFunction() const
getFunction - Return the LLVM function that this machine code represents
void print(raw_ostream &OS, bool SkipOpers=false, bool SkipDebugLoc=false, const TargetInstrInfo *TII=nullptr) const
Debugging supportPrint this MI to OS.
AnalysisUsage & addRequired()
#define INITIALIZE_PASS_DEPENDENCY(depName)
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
===- LazyMachineBlockFrequencyInfo.h - Lazy Block Frequency -*- C++ -*–===//
yaml::Output * getDiagnosticsOutputFile()
Return the YAML file used by the backend to save optimization diagnostics.
MachineArgument(StringRef Key, const MachineInstr &MI)
Print an entire MachineInstr.
This is an important class for using LLVM in a threaded context.
This is an alternative analysis pass to MachineBlockFrequencyInfo.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Represent the analysis usage information of a pass.
INITIALIZE_PASS_END(RegBankSelect, DEBUG_TYPE,"Assign register bank of generic virtual registers", false, false) RegBankSelect
The Output class is used to generate a yaml document from in-memory structs and vectors.
Used in the streaming interface as the general argument type.
uint64_t getDiagnosticsHotnessThreshold() const
Return the minimum hotness value a diagnostic would need in order to be included in optimization diag...
const MachineBasicBlock * getBlock() const
Common features for diagnostics dealing with optimization remarks that are used by both IR and MIR pa...
void setPreservesAll()
Set by analyses that do not transform their input at all.
Representation of each machine instruction.
void diagnose(const DiagnosticInfo &DI)
Report a message to the currently installed diagnostic handler.
A raw_ostream that writes to an std::string.
void setHotness(Optional< uint64_t > H)
StringRef - Represent a constant reference to a string, i.e.
Common features for diagnostics dealing with optimization remarks that are used by machine passes...
void initializeMachineOptimizationRemarkEmitterPassPass(PassRegistry &)