30 MI.
print(OS,
true,
false,
39 return MBFI->getBlockProfileCount(&MBB);
42 void MachineOptimizationRemarkEmitter::computeHotness(
51 auto &OptDiag = cast<DiagnosticInfoMIROptimization>(OptDiagCommon);
52 computeHotness(OptDiag);
57 if (OptDiag.getHotness().getValueOr(0) <
76 MBFI = &getAnalysis<LazyMachineBlockFrequencyInfoPass>().getBFI();
80 ORE = llvm::make_unique<MachineOptimizationRemarkEmitter>(MF, MBFI);
92 static const char ore_name[] =
"Machine Optimization Remark Emitter";
93 #define ORE_NAME "machine-opt-remark-emitter"
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
This class represents lattice values for constants.
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic b...
block Block Frequency true
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++ -*–===//
MachineArgument(StringRef Key, const MachineInstr &MI)
Print an entire MachineInstr.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
This is an important class for using LLVM in a threaded context.
This is an alternative analysis pass to MachineBlockFrequencyInfo.
uint64_t getDiagnosticsHotnessThreshold() const
Return the minimum hotness value a diagnostic would need in order to be included in optimization diag...
bool getDiagnosticsHotnessRequested() const
Return if a code hotness metric should be included in optimization diagnostics.
Represent the analysis usage information of a pass.
void print(raw_ostream &OS, bool IsStandalone=true, bool SkipOpers=false, bool SkipDebugLoc=false, bool AddNewLine=true, const TargetInstrInfo *TII=nullptr) const
Print this MI to OS.
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function. ...
Used in the streaming interface as the general argument type.
INITIALIZE_PASS_END(RegBankSelect, DEBUG_TYPE, "Assign register bank of generic virtual registers", false, false) RegBankSelect
Common features for diagnostics dealing with optimization remarks that are used by both IR and MIR pa...
const Function & getFunction() const
Return the LLVM function that this machine code represents.
void setPreservesAll()
Set by analyses that do not transform their input at all.
Representation of each machine instruction.
const MachineBasicBlock * getBlock() const
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 &)