LLVM API Documentation

Public Member Functions | Static Public Attributes
llvm::MachineBlockFrequencyInfo Class Reference

#include <MachineBlockFrequencyInfo.h>

Inheritance diagram for llvm::MachineBlockFrequencyInfo:
Inheritance graph
[legend]
Collaboration diagram for llvm::MachineBlockFrequencyInfo:
Collaboration graph
[legend]

List of all members.

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 MachineFunctiongetFunction () const
void view () const
raw_ostreamprintBlockFreq (raw_ostream &OS, const BlockFrequency Freq) const
raw_ostreamprintBlockFreq (raw_ostream &OS, const MachineBasicBlock *MBB) const
uint64_t getEntryFreq () const

Static Public Attributes

static char ID = 0

Detailed Description

MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic block frequencies.

Definition at line 29 of file MachineBlockFrequencyInfo.h.


Constructor & Destructor Documentation

Definition at line 131 of file MachineBlockFrequencyInfo.cpp.


Member Function Documentation

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().

Definition at line 191 of file MachineBlockFrequencyInfo.cpp.

Referenced by llvm::LiveIntervals::getSpillWeight().

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.

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.

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().


Member Data Documentation

machine block Machine Block Frequency true char MachineBlockFrequencyInfo::ID = 0 [static]

Definition at line 34 of file MachineBlockFrequencyInfo.h.


The documentation for this class was generated from the following files: