22#define DEBUG_TYPE "lazy-machine-block-freq"
25 "Lazy Machine Block Frequency Analysis",
true,
true)
29 "Lazy Machine Block Frequency Analysis",
true,
true)
50LazyMachineBlockFrequencyInfoPass::calculateIfNotAvailable()
const {
60 auto *MLI = MLIWrapper ? &MLIWrapper->getLI() :
nullptr;
62 auto *MDT = MDTWrapper ? &MDTWrapper->getDomTree() :
nullptr;
63 LLVM_DEBUG(
dbgs() <<
"Building MachineBlockFrequencyInfo on the fly\n");
71 OwnedMLI = std::make_unique<MachineLoopInfo>();
75 OwnedMDT = std::make_unique<MachineDominatorTree>();
76 OwnedMDT->recalculate(*MF);
84 OwnedMBFI = std::make_unique<MachineBlockFrequencyInfo>();
85 OwnedMBFI->calculate(*MF, MBPI, *MLI);
===- 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)
Represent the analysis usage information of a pass.
AnalysisUsage & addRequired()
void setPreservesAll()
Set by analyses that do not transform their input at all.
This is an alternative analysis pass to MachineBlockFrequencyInfo.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
LazyMachineBlockFrequencyInfoPass()
void releaseMemory() override
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
bool runOnMachineFunction(MachineFunction &F) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
const MachineBlockFrequencyInfo & getMBFI() const
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic b...
DominatorTree Class - Concrete subclass of DominatorTreeBase that is used to compute a normal dominat...
MachineFunctionPass(char &ID)
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
AnalysisType & getAnalysis() const
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information ...
AnalysisType * getAnalysisIfAvailable() const
getAnalysisIfAvailable<AnalysisType>() - Subclasses use this function to get analysis information tha...
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.