LLVM API Documentation
#include <MachineBranchProbabilityInfo.h>
Public Member Functions | |
MachineBranchProbabilityInfo () | |
void | getAnalysisUsage (AnalysisUsage &AU) const override |
uint32_t | getEdgeWeight (const MachineBasicBlock *Src, const MachineBasicBlock *Dst) const |
uint32_t | getEdgeWeight (const MachineBasicBlock *Src, MachineBasicBlock::const_succ_iterator Dst) const |
uint32_t | getSumForBlock (const MachineBasicBlock *MBB, uint32_t &Scale) const |
bool | isEdgeHot (const MachineBasicBlock *Src, const MachineBasicBlock *Dst) const |
MachineBasicBlock * | getHotSucc (MachineBasicBlock *MBB) const |
BranchProbability | getEdgeProbability (const MachineBasicBlock *Src, const MachineBasicBlock *Dst) const |
raw_ostream & | printEdgeProbability (raw_ostream &OS, const MachineBasicBlock *Src, const MachineBasicBlock *Dst) const |
Static Public Attributes | |
static char | ID = 0 |
Definition at line 24 of file MachineBranchProbabilityInfo.h.
Definition at line 38 of file MachineBranchProbabilityInfo.h.
References llvm::PassRegistry::getPassRegistry(), and llvm::initializeMachineBranchProbabilityInfoPass().
void llvm::MachineBranchProbabilityInfo::getAnalysisUsage | ( | AnalysisUsage & | ) | const [inline, override, virtual] |
getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. If a pass specifies that it uses a particular analysis result to this function, it can then use the getAnalysis<AnalysisType>() function, below.
Reimplemented from llvm::Pass.
Definition at line 43 of file MachineBranchProbabilityInfo.h.
References llvm::AnalysisUsage::setPreservesAll().
BranchProbability MachineBranchProbabilityInfo::getEdgeProbability | ( | const MachineBasicBlock * | Src, |
const MachineBasicBlock * | Dst | ||
) | const |
Definition at line 107 of file MachineBranchProbabilityInfo.cpp.
References getEdgeWeight(), getSumForBlock(), and N.
Referenced by llvm::HexagonInstrInfo::getDotNewPredJumpOp(), getHotSucc(), getNewValueJumpOpcode(), isEdgeHot(), and printEdgeProbability().
uint32_t MachineBranchProbabilityInfo::getEdgeWeight | ( | const MachineBasicBlock * | Src, |
const MachineBasicBlock * | Dst | ||
) | const |
Definition at line 73 of file MachineBranchProbabilityInfo.cpp.
References llvm::MachineBasicBlock::succ_begin(), and llvm::MachineBasicBlock::succ_end().
Referenced by getEdgeProbability(), getHotSucc(), getSumForBlock(), and ScaleWeights().
uint32_t MachineBranchProbabilityInfo::getEdgeWeight | ( | const MachineBasicBlock * | Src, |
MachineBasicBlock::const_succ_iterator | Dst | ||
) | const |
Definition at line 64 of file MachineBranchProbabilityInfo.cpp.
MachineBasicBlock * MachineBranchProbabilityInfo::getHotSucc | ( | MachineBasicBlock * | MBB | ) | const |
Definition at line 89 of file MachineBranchProbabilityInfo.cpp.
References getEdgeProbability(), getEdgeWeight(), I, llvm::MachineBasicBlock::succ_begin(), and llvm::MachineBasicBlock::succ_end().
uint32_t MachineBranchProbabilityInfo::getSumForBlock | ( | const MachineBasicBlock * | MBB, |
uint32_t & | Scale | ||
) | const |
Definition at line 32 of file MachineBranchProbabilityInfo.cpp.
References getEdgeWeight(), I, llvm::MachineBasicBlock::succ_begin(), llvm::MachineBasicBlock::succ_end(), and llvm::MachineBasicBlock::succ_size().
Referenced by getEdgeProbability().
bool MachineBranchProbabilityInfo::isEdgeHot | ( | const MachineBasicBlock * | Src, |
const MachineBasicBlock * | Dst | ||
) | const |
Definition at line 81 of file MachineBranchProbabilityInfo.cpp.
References getEdgeProbability().
Referenced by printEdgeProbability().
raw_ostream & MachineBranchProbabilityInfo::printEdgeProbability | ( | raw_ostream & | OS, |
const MachineBasicBlock * | Src, | ||
const MachineBasicBlock * | Dst | ||
) | const |
Definition at line 116 of file MachineBranchProbabilityInfo.cpp.
References getEdgeProbability(), llvm::MachineBasicBlock::getNumber(), and isEdgeHot().
machine branch Machine Branch Probability true char MachineBranchProbabilityInfo::ID = 0 [static] |
Definition at line 36 of file MachineBranchProbabilityInfo.h.