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
bool runOnMachineFunction (MachineFunction &F)
BlockFrequency getBlockFreq (const MachineBasicBlock *MBB) const

Static Public Attributes

static char ID = 0

Detailed Description

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

Definition at line 30 of file MachineBlockFrequencyInfo.h.


Constructor & Destructor Documentation

MachineBlockFrequencyInfo::MachineBlockFrequencyInfo ( )
MachineBlockFrequencyInfo::~MachineBlockFrequencyInfo ( )

Definition at line 37 of file MachineBlockFrequencyInfo.cpp.


Member Function Documentation

void MachineBlockFrequencyInfo::getAnalysisUsage ( AnalysisUsage AU) const [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 41 of file MachineBlockFrequencyInfo.cpp.

References llvm::AnalysisUsage::addRequired(), and llvm::AnalysisUsage::setPreservesAll().

BlockFrequency MachineBlockFrequencyInfo::getBlockFreq ( const MachineBasicBlock MBB) const

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 59 of file MachineBlockFrequencyInfo.cpp.

References llvm::BlockFrequencyImpl< BlockT, FunctionT, BlockProbInfoT >::getBlockFreq().

bool MachineBlockFrequencyInfo::runOnMachineFunction ( MachineFunction MF) [virtual]

runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.

Implements llvm::MachineFunctionPass.

Definition at line 47 of file MachineBlockFrequencyInfo.cpp.


Member Data Documentation

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

Definition at line 36 of file MachineBlockFrequencyInfo.h.


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