class MachineBlockFrequencyInfo
Declaration
class MachineBlockFrequencyInfo : public MachineFunctionPass { /* full declaration omitted */ };
Description
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic block frequencies.
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:33
Inherits from: MachineFunctionPass
Member Variables
- public static char ID
Method Overview
- public MachineBlockFrequencyInfo(llvm::MachineFunction & F, llvm::MachineBranchProbabilityInfo & MBPI, llvm::MachineLoopInfo & MLI)
- public MachineBlockFrequencyInfo()
- public void calculate(const llvm::MachineFunction & F, const llvm::MachineBranchProbabilityInfo & MBPI, const llvm::MachineLoopInfo & MLI)
- public void getAnalysisUsage(llvm::AnalysisUsage & AU) const
- public llvm::BlockFrequency getBlockFreq(const llvm::MachineBasicBlock * MBB) const
- public Optional<uint64_t> getBlockProfileCount(const llvm::MachineBasicBlock * MBB) const
- public uint64_t getEntryFreq() const
- public const llvm::MachineFunction * getFunction() const
- public const llvm::MachineBranchProbabilityInfo * getMBPI() const
- public Optional<uint64_t> getProfileCountFromFreq(uint64_t Freq) const
- public bool isIrrLoopHeader(const llvm::MachineBasicBlock * MBB)
- public llvm::raw_ostream & printBlockFreq(llvm::raw_ostream & OS, const llvm::BlockFrequency Freq) const
- public llvm::raw_ostream & printBlockFreq(llvm::raw_ostream & OS, const llvm::MachineBasicBlock * MBB) const
- public void releaseMemory()
- public bool runOnMachineFunction(llvm::MachineFunction & F)
- public void view(const llvm::Twine & Name, bool isSimple = true) const
- public ~MachineBlockFrequencyInfo()
Inherited from MachineFunctionPass:
- public doInitialization
- protected getAnalysisUsage
- protected getClearedProperties
- protected getRequiredProperties
- protected getSetProperties
- protected runOnMachineFunction
Inherited from FunctionPass:
- public assignPassManager
- public createPrinterPass
- public getPotentialPassManagerType
- public runOnFunction
- protected skipFunction
Inherited from Pass:
- public assignPassManager
- public createPass
- public createPrinterPass
- public doFinalization
- public doInitialization
- public dump
- public dumpPassStructure
- public getAdjustedAnalysisPointer
- public getAnalysis
- public getAnalysis
- public getAnalysisID
- public getAnalysisID
- public getAnalysisIfAvailable
- public getAnalysisUsage
- public getAsImmutablePass
- public getAsPMDataManager
- public getPassID
- public getPassKind
- public getPassName
- public getPotentialPassManagerType
- public getResolver
- public lookupPassInfo
- public lookupPassInfo
- public mustPreserveAnalysisID
- public preparePassManager
- public print
- public releaseMemory
- public setResolver
- public verifyAnalysis
Methods
¶MachineBlockFrequencyInfo(
llvm::MachineFunction& F,
llvm::MachineBranchProbabilityInfo& MBPI,
llvm::MachineLoopInfo& MLI)
MachineBlockFrequencyInfo(
llvm::MachineFunction& F,
llvm::MachineBranchProbabilityInfo& MBPI,
llvm::MachineLoopInfo& MLI)
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:41
Parameters
¶MachineBlockFrequencyInfo()
MachineBlockFrequencyInfo()
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:40
¶void calculate(
const llvm::MachineFunction& F,
const llvm::MachineBranchProbabilityInfo&
MBPI,
const llvm::MachineLoopInfo& MLI)
void calculate(
const llvm::MachineFunction& F,
const llvm::MachineBranchProbabilityInfo&
MBPI,
const llvm::MachineLoopInfo& MLI)
Description
calculate - compute block frequency info for the given function.
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:51
Parameters
- const llvm::MachineFunction& F
- const llvm::MachineBranchProbabilityInfo& MBPI
- const llvm::MachineLoopInfo& MLI
¶void getAnalysisUsage(
llvm::AnalysisUsage& AU) const
void getAnalysisUsage(
llvm::AnalysisUsage& AU) const
Description
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this. For MachineFunctionPasses, calling AU.preservesCFG() indicates that the pass does not modify the MachineBasicBlock CFG.
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:46
Parameters
¶llvm::BlockFrequency getBlockFreq(
const llvm::MachineBasicBlock* MBB) const
llvm::BlockFrequency getBlockFreq(
const llvm::MachineBasicBlock* MBB) const
Description
getblockFreq - Return block frequency. Return 0 if we don't have the information. Please note that initial frequency is equal to 1024. It means that we should not rely on the value itself, but only on the comparison to the other block frequencies. We do this to avoid using of floating points.
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:62
Parameters
- const llvm::MachineBasicBlock* MBB
¶Optional<uint64_t> getBlockProfileCount(
const llvm::MachineBasicBlock* MBB) const
Optional<uint64_t> getBlockProfileCount(
const llvm::MachineBasicBlock* MBB) const
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:64
Parameters
- const llvm::MachineBasicBlock* MBB
¶uint64_t getEntryFreq() const
uint64_t getEntryFreq() const
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:82
¶const llvm::MachineFunction* getFunction() const
const llvm::MachineFunction* getFunction() const
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:69
¶const llvm::MachineBranchProbabilityInfo*
getMBPI() const
const llvm::MachineBranchProbabilityInfo*
getMBPI() const
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:70
¶Optional<uint64_t> getProfileCountFromFreq(
uint64_t Freq) const
Optional<uint64_t> getProfileCountFromFreq(
uint64_t Freq) const
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:65
Parameters
- uint64_t Freq
¶bool isIrrLoopHeader(
const llvm::MachineBasicBlock* MBB)
bool isIrrLoopHeader(
const llvm::MachineBasicBlock* MBB)
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:67
Parameters
- const llvm::MachineBasicBlock* MBB
¶llvm::raw_ostream& printBlockFreq(
llvm::raw_ostream& OS,
const llvm::BlockFrequency Freq) const
llvm::raw_ostream& printBlockFreq(
llvm::raw_ostream& OS,
const llvm::BlockFrequency Freq) const
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:75
Parameters
- llvm::raw_ostream& OS
- const llvm::BlockFrequency Freq
¶llvm::raw_ostream& printBlockFreq(
llvm::raw_ostream& OS,
const llvm::MachineBasicBlock* MBB) const
llvm::raw_ostream& printBlockFreq(
llvm::raw_ostream& OS,
const llvm::MachineBasicBlock* MBB) const
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:79
Parameters
- llvm::raw_ostream& OS
- const llvm::MachineBasicBlock* MBB
¶void releaseMemory()
void releaseMemory()
Description
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused. Optionally implement this function to release pass memory when it is no longer used.
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:55
¶bool runOnMachineFunction(
llvm::MachineFunction& F)
bool runOnMachineFunction(
llvm::MachineFunction& F)
Description
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:48
Parameters
¶void view(const llvm::Twine& Name,
bool isSimple = true) const
void view(const llvm::Twine& Name,
bool isSimple = true) const
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:71
Parameters
- const llvm::Twine& Name
- bool isSimple = true
¶~MachineBlockFrequencyInfo()
~MachineBlockFrequencyInfo()
Declared at: llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h:44