LLVM API Documentation
#include <MachineBlockFrequencyInfo.h>
Public Member Functions | |
MachineBlockFrequencyInfo () | |
~MachineBlockFrequencyInfo () | |
void | getAnalysisUsage (AnalysisUsage &AU) const override |
bool | runOnMachineFunction (MachineFunction &F) override |
void | releaseMemory () override |
BlockFrequency | getBlockFreq (const MachineBasicBlock *MBB) const |
const MachineFunction * | getFunction () const |
void | view () const |
raw_ostream & | printBlockFreq (raw_ostream &OS, const BlockFrequency Freq) const |
raw_ostream & | printBlockFreq (raw_ostream &OS, const MachineBasicBlock *MBB) const |
uint64_t | getEntryFreq () const |
Static Public Attributes | |
static char | ID = 0 |
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic block frequencies.
Definition at line 29 of file MachineBlockFrequencyInfo.h.
Definition at line 127 of file MachineBlockFrequencyInfo.cpp.
References llvm::PassRegistry::getPassRegistry(), and llvm::initializeMachineBlockFrequencyInfoPass().
Definition at line 131 of file MachineBlockFrequencyInfo.cpp.
void MachineBlockFrequencyInfo::getAnalysisUsage | ( | AnalysisUsage & | AU | ) | const [override, virtual] |
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
For MachineFunctionPasses, calling AU.preservesCFG() indicates that the pass does not modify the MachineBasicBlock CFG.
Reimplemented from llvm::MachineFunctionPass.
Definition at line 133 of file MachineBlockFrequencyInfo.cpp.
References llvm::AnalysisUsage::addRequired(), and llvm::AnalysisUsage::setPreservesAll().
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.
Definition at line 171 of file MachineBlockFrequencyInfo.cpp.
Referenced by llvm::DOTGraphTraits< MachineBlockFrequencyInfo * >::getNodeLabel(), and llvm::LiveIntervals::getSpillWeight().
uint64_t MachineBlockFrequencyInfo::getEntryFreq | ( | ) | const |
Definition at line 191 of file MachineBlockFrequencyInfo.cpp.
Referenced by llvm::LiveIntervals::getSpillWeight().
Definition at line 175 of file MachineBlockFrequencyInfo.cpp.
Referenced by llvm::GraphTraits< MachineBlockFrequencyInfo * >::getEntryNode(), llvm::DOTGraphTraits< MachineBlockFrequencyInfo * >::getGraphName(), llvm::GraphTraits< MachineBlockFrequencyInfo * >::nodes_begin(), and llvm::GraphTraits< MachineBlockFrequencyInfo * >::nodes_end().
raw_ostream & MachineBlockFrequencyInfo::printBlockFreq | ( | raw_ostream & | OS, |
const BlockFrequency | Freq | ||
) | const |
Definition at line 180 of file MachineBlockFrequencyInfo.cpp.
Referenced by llvm::DOTGraphTraits< MachineBlockFrequencyInfo * >::getNodeLabel().
raw_ostream & MachineBlockFrequencyInfo::printBlockFreq | ( | raw_ostream & | OS, |
const MachineBasicBlock * | MBB | ||
) | const |
Definition at line 186 of file MachineBlockFrequencyInfo.cpp.
void MachineBlockFrequencyInfo::releaseMemory | ( | ) | [override, virtual] |
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.
Reimplemented from llvm::Pass.
Definition at line 155 of file MachineBlockFrequencyInfo.cpp.
bool MachineBlockFrequencyInfo::runOnMachineFunction | ( | MachineFunction & | MF | ) | [override, virtual] |
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.
Implements llvm::MachineFunctionPass.
Definition at line 140 of file MachineBlockFrequencyInfo.cpp.
References GVDT_None, view(), and ViewMachineBlockFreqPropagationDAG.
void MachineBlockFrequencyInfo::view | ( | ) | const |
Pop up a ghostview window with the current block frequency propagation rendered using dot.
Definition at line 159 of file MachineBlockFrequencyInfo.cpp.
References llvm::errs(), and llvm::ViewGraph().
Referenced by runOnMachineFunction().
machine block Machine Block Frequency true char MachineBlockFrequencyInfo::ID = 0 [static] |
Definition at line 34 of file MachineBlockFrequencyInfo.h.