27 Key = std::string(MKey);
30 MI.print(OS,
true,
false,
36 MachineFunctionAnalysisManager::Invalidator &Inv) {
42std::optional<uint64_t>
47 return MBFI->getBlockProfileCount(&
MBB);
50void MachineOptimizationRemarkEmitter::computeHotness(
60 computeHotness(OptDiag);
65 if (OptDiag.getHotness().value_or(0) < Ctx.getDiagnosticsHotnessThreshold())
86 ORE = std::make_unique<MachineOptimizationRemarkEmitter>(MF, MBFI);
97AnalysisKey MachineOptimizationRemarkEmitterAnalysis::Key;
110static const char ore_name[] =
"Machine Optimization Remark Emitter";
111#define ORE_NAME "machine-opt-remark-emitter"
===- LazyMachineBlockFrequencyInfo.h - Lazy Block Frequency -*- C++ -*â===//
#define INITIALIZE_PASS_DEPENDENCY(depName)
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Represent the analysis usage information of a pass.
AnalysisUsage & addRequired()
void setPreservesAll()
Set by analyses that do not transform their input at all.
Common features for diagnostics dealing with optimization remarks that are used by machine passes.
Common features for diagnostics dealing with optimization remarks that are used by both IR and MIR pa...
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function.
This is an important class for using LLVM in a threaded context.
LLVM_ABI bool getDiagnosticsHotnessRequested() const
Return if a code hotness metric should be included in optimization diagnostics.
LLVM_ABI void diagnose(const DiagnosticInfo &DI)
Report a message to the currently installed diagnostic handler.
This is an alternative analysis pass to MachineBlockFrequencyInfo.
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic b...
MachineFunctionPass(char &ID)
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Function & getFunction()
Return the LLVM function that this machine code represents.
Representation of each machine instruction.
static LLVM_ABI PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
AnalysisType & getAnalysis() const
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information ...
A set of analyses that are preserved following a run of a transformation pass.
StringRef - Represent a constant reference to a string, i.e.
A raw_ostream that writes to an std::string.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI void initializeMachineOptimizationRemarkEmitterPassPass(PassRegistry &)
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
A special type used by analysis passes to provide an address that identifies that particular analysis...
LLVM_ABI MachineArgument(StringRef Key, const MachineInstr &MI)
Print an entire MachineInstr.