|
LLVM
4.0.0
|
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequencies. More...
#include <BlockFrequencyInfo.h>
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequencies.
Definition at line 31 of file BlockFrequencyInfo.h.
| BlockFrequencyInfo::BlockFrequencyInfo | ( | ) |
Definition at line 112 of file BlockFrequencyInfo.cpp.
| BlockFrequencyInfo::BlockFrequencyInfo | ( | const Function & | F, |
| const BranchProbabilityInfo & | BPI, | ||
| const LoopInfo & | LI | ||
| ) |
Definition at line 114 of file BlockFrequencyInfo.cpp.
References calculate().
| BlockFrequencyInfo::BlockFrequencyInfo | ( | BlockFrequencyInfo && | Arg | ) |
Definition at line 120 of file BlockFrequencyInfo.cpp.
| BlockFrequencyInfo::~BlockFrequencyInfo | ( | ) |
Definition at line 133 of file BlockFrequencyInfo.cpp.
| void BlockFrequencyInfo::calculate | ( | const Function & | F, |
| const BranchProbabilityInfo & | BPI, | ||
| const LoopInfo & | LI | ||
| ) |
calculate - compute block frequency info for the given function.
Definition at line 135 of file BlockFrequencyInfo.cpp.
References llvm::AMDGPUISD::BFI, llvm::StringRef::equals(), llvm::Value::getName(), llvm::GVDT_None, view(), ViewBlockFreqFuncName, and ViewBlockFreqPropagationDAG.
Referenced by BlockFrequencyInfo(), and llvm::BlockFrequencyAnalysis::run().
| BlockFrequency BlockFrequencyInfo::getBlockFreq | ( | const BasicBlock * | BB | ) | const |
getblockFreq - Return block frequency.
Return 0 if we don't have the information. Please note that initial frequency is equal to ENTRY_FREQ. 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 150 of file BlockFrequencyInfo.cpp.
References llvm::AMDGPUISD::BFI.
Referenced by adjustedSumFreq(), llvm::CFGMST< Edge, BBInfo >::buildEdges(), findBBsToSinkInto(), and sinkLoopInvariantInstructions().
| Optional< uint64_t > BlockFrequencyInfo::getBlockProfileCount | ( | const BasicBlock * | BB | ) | const |
Returns the estimated profile count of BB.
This computes the relative block frequency of BB and multiplies it by the enclosing function's count (if available) and returns the value.
Definition at line 155 of file BlockFrequencyInfo.cpp.
References llvm::AMDGPUISD::BFI, getFunction(), and llvm::None.
Referenced by computeFunctionSummary(), and llvm::ProfileSummaryInfo::isHotBB().
| const BranchProbabilityInfo * BlockFrequencyInfo::getBPI | ( | ) | const |
Definition at line 190 of file BlockFrequencyInfo.cpp.
References llvm::AMDGPUISD::BFI.
Referenced by llvm::DOTGraphTraits< BlockFrequencyInfo * >::getEdgeAttributes().
| uint64_t BlockFrequencyInfo::getEntryFreq | ( | ) | const |
Definition at line 205 of file BlockFrequencyInfo.cpp.
References llvm::AMDGPUISD::BFI.
Referenced by llvm::CFGMST< Edge, BBInfo >::buildEdges().
Definition at line 186 of file BlockFrequencyInfo.cpp.
References llvm::AMDGPUISD::BFI.
Referenced by getBlockProfileCount(), llvm::GraphTraits< BlockFrequencyInfo * >::getEntryNode(), getProfileCountFromFreq(), llvm::GraphTraits< BlockFrequencyInfo * >::nodes_begin(), and llvm::GraphTraits< BlockFrequencyInfo * >::nodes_end().
| Optional< uint64_t > BlockFrequencyInfo::getProfileCountFromFreq | ( | uint64_t | Freq | ) | const |
Returns the estimated profile count of Freq.
This uses the frequency Freq and multiplies it by the enclosing function's count (if available) and returns the value.
Definition at line 163 of file BlockFrequencyInfo.cpp.
References llvm::AMDGPUISD::BFI, getFunction(), and llvm::None.
| BlockFrequencyInfo & BlockFrequencyInfo::operator= | ( | BlockFrequencyInfo && | RHS | ) |
Definition at line 123 of file BlockFrequencyInfo.cpp.
References llvm::AMDGPUISD::BFI, and releaseMemory().
| void BlockFrequencyInfo::print | ( | raw_ostream & | OS | ) | const |
Definition at line 211 of file BlockFrequencyInfo.cpp.
References llvm::AMDGPUISD::BFI.
| raw_ostream & BlockFrequencyInfo::printBlockFreq | ( | raw_ostream & | OS, |
| const BlockFrequency | Freq | ||
| ) | const |
Definition at line 195 of file BlockFrequencyInfo.cpp.
References llvm::AMDGPUISD::BFI.
| raw_ostream & BlockFrequencyInfo::printBlockFreq | ( | raw_ostream & | OS, |
| const BasicBlock * | BB | ||
| ) | const |
Definition at line 200 of file BlockFrequencyInfo.cpp.
References llvm::AMDGPUISD::BFI.
| void BlockFrequencyInfo::releaseMemory | ( | ) |
Definition at line 209 of file BlockFrequencyInfo.cpp.
References llvm::AMDGPUISD::BFI.
Referenced by operator=().
| void BlockFrequencyInfo::setBlockFreq | ( | const BasicBlock * | BB, |
| uint64_t | Freq | ||
| ) |
Definition at line 169 of file BlockFrequencyInfo.cpp.
References assert(), and llvm::AMDGPUISD::BFI.
| void BlockFrequencyInfo::view | ( | ) | const |
Pop up a ghostview window with the current block frequency propagation rendered using dot.
Definition at line 176 of file BlockFrequencyInfo.cpp.
References llvm::errs(), and llvm::ViewGraph().
Referenced by calculate().
1.8.6