LLVM
8.0.1
|
#include "llvm/Support/BranchProbability.h"
Static Public Member Functions | |
static BranchProbability | getZero () |
static BranchProbability | getOne () |
static BranchProbability | getUnknown () |
static BranchProbability | getRaw (uint32_t N) |
static BranchProbability | getBranchProbability (uint64_t Numerator, uint64_t Denominator) |
template<class ProbabilityIter > | |
static void | normalizeProbabilities (ProbabilityIter Begin, ProbabilityIter End) |
static uint32_t | getDenominator () |
Definition at line 31 of file BranchProbability.h.
|
inline |
Definition at line 44 of file BranchProbability.h.
Referenced by getBranchProbability(), getCompl(), getOne(), getRaw(), getUnknown(), and getZero().
Definition at line 40 of file BranchProbability.cpp.
References assert().
LLVM_DUMP_METHOD void BranchProbability::dump | ( | ) | const |
Definition at line 37 of file BranchProbability.cpp.
References llvm::dbgs(), and print().
Referenced by getCompl().
|
static |
Definition at line 53 of file BranchProbability.cpp.
References assert(), and BranchProbability().
Referenced by checkMDProf(), getCHRBiasThreshold(), llvm::BFIDOTGraphTraitsBase< BlockFrequencyInfoT, BranchProbabilityInfoT >::getNodeAttributes(), getRaw(), hasProfileData(), isFormingBranchFromSelectProfitable(), mergeOperations(), llvm::JumpThreadingPass::ThreadEdge(), and updatePredecessorProfileMetadata().
|
inline |
Definition at line 70 of file BranchProbability.h.
References BranchProbability(), dump(), print(), scale(), and scaleByInverse().
Referenced by computeUnlikelySuccessors(), llvm::BranchProbabilityInfo::getBranchProbStackProtector(), getLayoutSuccessorProbThreshold(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), scaleCaseProbality(), splitMBB(), and updatePredecessorProfileMetadata().
|
inlinestatic |
Definition at line 67 of file BranchProbability.h.
Referenced by llvm::BFIDOTGraphTraitsBase< BlockFrequencyInfoT, BranchProbabilityInfoT >::getEdgeAttributes(), llvm::MachineBasicBlock::print(), scaleCaseProbality(), and llvm::MachineBasicBlock::validateSuccProbs().
|
inline |
Definition at line 66 of file BranchProbability.h.
Referenced by getAdjustedProbability(), llvm::BFIDOTGraphTraitsBase< BlockFrequencyInfoT, BranchProbabilityInfoT >::getEdgeAttributes(), llvm::getWeightFromBranchProb(), llvm::MIPrinter::print(), llvm::MachineBasicBlock::print(), scaleCaseProbality(), and updatePredecessorProfileMetadata().
|
inlinestatic |
Definition at line 51 of file BranchProbability.h.
References BranchProbability().
Referenced by llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::MipsTargetLowering::EmitInstrWithCustomInserter(), getAdjustedProbability(), getBlockName(), scaleCaseProbality(), and UpdatePredRedefs().
|
inlinestatic |
Definition at line 55 of file BranchProbability.h.
References BranchProbability(), getBranchProbability(), and normalizeProbabilities().
Referenced by toString().
|
inlinestatic |
Definition at line 52 of file BranchProbability.h.
References BranchProbability().
Referenced by llvm::SelectionDAGBuilder::getFrameIndexTy(), llvm::MachineBasicBlock::setIsCleanupFuncletEntry(), splitMBB(), and llvm::MachineBasicBlock::splitSuccessor().
|
inlinestatic |
Definition at line 50 of file BranchProbability.h.
References BranchProbability().
Referenced by llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::MachineBasicBlock::findBranchDebugLoc(), llvm::CodeExtractor::findInputsOutputs(), findUnwindDestinations(), llvm::BranchProbabilityInfo::getEdgeProbability(), llvm::MachineBranchProbabilityInfo::getHotSucc(), llvm::BranchProbabilityInfo::getHotSucc(), getLayoutSuccessorProbThreshold(), greaterWithBias(), MaySpeculate(), llvm::ARMTargetLowering::ReplaceNodeResults(), scaleCaseProbality(), tryToElideArgumentCopy(), and llvm::SelectionDAGBuilder::visitBitTestCase().
|
inline |
Definition at line 48 of file BranchProbability.h.
Referenced by findUncondBrI(), llvm::SelectionDAGBuilder::isExportableFromCurrentBlock(), print(), and llvm::MachineBasicBlock::setSuccProbability().
|
inline |
Definition at line 47 of file BranchProbability.h.
|
static |
Definition at line 188 of file BranchProbability.h.
Referenced by llvm::SelectionDAGBuilder::FindMergedConditions(), getRaw(), llvm::guessSuccessors(), llvm::MachineBasicBlock::normalizeSuccProbs(), and llvm::JumpThreadingPass::ThreadEdge().
|
inline |
Definition at line 156 of file BranchProbability.h.
|
inline |
Definition at line 140 of file BranchProbability.h.
|
inline |
Definition at line 145 of file BranchProbability.h.
|
inline |
Definition at line 108 of file BranchProbability.h.
References assert().
|
inline |
Definition at line 115 of file BranchProbability.h.
References assert().
|
inline |
Definition at line 130 of file BranchProbability.h.
|
inline |
Definition at line 92 of file BranchProbability.h.
References assert().
|
inline |
Definition at line 135 of file BranchProbability.h.
|
inline |
Definition at line 100 of file BranchProbability.h.
References assert().
|
inline |
Definition at line 150 of file BranchProbability.h.
|
inline |
Definition at line 122 of file BranchProbability.h.
References assert().
|
inline |
Definition at line 158 of file BranchProbability.h.
References assert().
|
inline |
Definition at line 170 of file BranchProbability.h.
References assert().
|
inline |
Definition at line 155 of file BranchProbability.h.
|
inline |
Definition at line 164 of file BranchProbability.h.
References assert().
|
inline |
Definition at line 176 of file BranchProbability.h.
References assert().
raw_ostream & BranchProbability::print | ( | raw_ostream & | OS | ) | const |
Definition at line 25 of file BranchProbability.cpp.
References llvm::format(), isUnknown(), llvm::Percent, and llvm::Intrinsic::rint.
Referenced by dump(), getCompl(), and llvm::operator<<().
uint64_t BranchProbability::scale | ( | uint64_t | Num | ) | const |
Scale a large integer.
Scales Num
. Guarantees full precision. Returns the floor of the result.
Num
times this
. Definition at line 111 of file BranchProbability.cpp.
Referenced by llvm::CFGMST< Edge, BBInfo >::buildEdges(), getCompl(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), llvm::BlockFrequency::operator*=(), llvm::bfi_detail::BlockMass::operator*=(), scaleCaseProbality(), and sumEdgeCount().
uint64_t BranchProbability::scaleByInverse | ( | uint64_t | Num | ) | const |
Scale a large integer by the inverse.
Scales Num
by the inverse of this
. Guarantees full precision. Returns the floor of the result.
Num
divided by this
. Definition at line 115 of file BranchProbability.cpp.
Referenced by getCompl(), and llvm::BlockFrequency::operator/=().