#include "llvm/CodeGen/LazyMachineBlockFrequencyInfo.h"
#include "llvm/CodeGen/MachineBranchProbabilityInfo.h"
#include "llvm/InitializePasses.h"
usingnamespacellvm;
#define DEBUG_TYPE …
INITIALIZE_PASS_BEGIN(LazyMachineBlockFrequencyInfoPass, DEBUG_TYPE,
"Lazy Machine Block Frequency Analysis", true, true)
INITIALIZE_PASS_DEPENDENCY(MachineBranchProbabilityInfoWrapperPass)
INITIALIZE_PASS_DEPENDENCY(MachineLoopInfoWrapperPass)
INITIALIZE_PASS_END(LazyMachineBlockFrequencyInfoPass, DEBUG_TYPE,
"Lazy Machine Block Frequency Analysis", true, true)
char LazyMachineBlockFrequencyInfoPass::ID = …;
LazyMachineBlockFrequencyInfoPass::LazyMachineBlockFrequencyInfoPass()
: … { … }
void LazyMachineBlockFrequencyInfoPass::getAnalysisUsage(
AnalysisUsage &AU) const { … }
void LazyMachineBlockFrequencyInfoPass::releaseMemory() { … }
MachineBlockFrequencyInfo &
LazyMachineBlockFrequencyInfoPass::calculateIfNotAvailable() const { … }
bool LazyMachineBlockFrequencyInfoPass::runOnMachineFunction(
MachineFunction &F) { … }