LLVM 22.0.0git
|
#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 LLVM_ABI BranchProbability | getBranchProbability (uint64_t Numerator, uint64_t Denominator) |
template<class ProbabilityIter > | |
static void | normalizeProbabilities (ProbabilityIter Begin, ProbabilityIter End) |
template<class ProbabilityContainer > | |
static void | normalizeProbabilities (ProbabilityContainer &&R) |
static uint32_t | getDenominator () |
Definition at line 32 of file BranchProbability.h.
|
inline |
Definition at line 45 of file BranchProbability.h.
References N.
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().
|
static |
Definition at line 53 of file BranchProbability.cpp.
References assert(), and BranchProbability().
Referenced by extractBranchProbabilities(), foldTwoEntryPHINode(), getCHRBiasThreshold(), llvm::BFIDOTGraphTraitsBase< BlockFrequencyInfoT, BranchProbabilityInfoT >::getNodeAttributes(), isFormingBranchFromSelectProfitable(), isProfitableToSpeculate(), shouldFoldCondBranchesToCommonDestination(), SimplifyCondBranchToCondBranch(), llvm::JumpThreadingPass::unfoldSelectInstr(), updatePredecessorProfileMetadata(), and llvm::misexpect::verifyMisExpect().
|
inline |
Definition at line 76 of file BranchProbability.h.
References BranchProbability(), and N.
Referenced by foldTwoEntryPHINode(), llvm::BranchProbabilityInfo::getBranchProbStackProtector(), llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), scaleCaseProbality(), shouldFoldCondBranchesToCommonDestination(), splitMBB(), and updatePredecessorProfileMetadata().
|
inlinestatic |
Definition at line 73 of file BranchProbability.h.
Referenced by llvm::BFIDOTGraphTraitsBase< BlockFrequencyInfoT, BranchProbabilityInfoT >::getEdgeAttributes(), normalizeProbabilities(), llvm::MachineBasicBlock::print(), scaleCaseProbality(), llvm::BranchProbabilityInfo::setEdgeProbability(), and llvm::MachineBasicBlock::validateSuccProbs().
|
inline |
Definition at line 72 of file BranchProbability.h.
References N.
Referenced by llvm::AsmPrinter::emitBBAddrMapSection(), getAdjustedProbability(), llvm::BFIDOTGraphTraitsBase< BlockFrequencyInfoT, BranchProbabilityInfoT >::getEdgeAttributes(), llvm::getWeightFromBranchProb(), llvm::MachineBasicBlock::print(), printMBB(), scaleCaseProbality(), and updatePredecessorProfileMetadata().
|
inlinestatic |
Definition at line 52 of file BranchProbability.h.
References BranchProbability().
Referenced by llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), getAdjustedProbability(), and scaleCaseProbality().
|
inlinestatic |
Definition at line 56 of file BranchProbability.h.
References BranchProbability(), and N.
Referenced by decodeBBAddrMapImpl(), and normalizeProbabilities().
|
inlinestatic |
Definition at line 53 of file BranchProbability.h.
References BranchProbability().
Referenced by splitMBB(), and llvm::MachineBasicBlock::splitSuccessor().
|
inlinestatic |
Definition at line 51 of file BranchProbability.h.
References BranchProbability().
Referenced by llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::SwitchCG::SwitchLowering::buildBitTests(), llvm::SwitchCG::SwitchLowering::buildJumpTable(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), llvm::BranchProbabilityInfo::getEdgeProbability(), llvm::MachineBasicBlock::getSuccProbability(), normalizeProbabilities(), and scaleCaseProbality().
|
inline |
Definition at line 49 of file BranchProbability.h.
References N.
Referenced by normalizeProbabilities(), print(), llvm::MachineBasicBlock::setSuccProbability(), shouldFoldCondBranchesToCommonDestination(), and splitMBB().
|
inline |
Definition at line 48 of file BranchProbability.h.
References N.
|
inlinestatic |
Definition at line 68 of file BranchProbability.h.
References llvm::adl_begin(), llvm::adl_end(), and normalizeProbabilities().
|
static |
Definition at line 214 of file BranchProbability.h.
References End, getDenominator(), getRaw(), getZero(), I, and isUnknown().
Referenced by llvm::MachineBasicBlock::canPredictBranchProbabilities(), llvm::SelectionDAGBuilder::FindMergedConditions(), normalizeProbabilities(), and llvm::MachineBasicBlock::normalizeSuccProbs().
|
inline |
Definition at line 182 of file BranchProbability.h.
References RHS.
|
inline |
Definition at line 157 of file BranchProbability.h.
References RHS.
|
inline |
Definition at line 163 of file BranchProbability.h.
References RHS.
|
inline |
Definition at line 116 of file BranchProbability.h.
|
inline |
Definition at line 123 of file BranchProbability.h.
|
inline |
Definition at line 145 of file BranchProbability.h.
References RHS.
|
inline |
Definition at line 100 of file BranchProbability.h.
|
inline |
Definition at line 151 of file BranchProbability.h.
References RHS.
|
inline |
Definition at line 108 of file BranchProbability.h.
|
inline |
Definition at line 169 of file BranchProbability.h.
References RHS.
|
inline |
Definition at line 175 of file BranchProbability.h.
References RHS.
|
inline |
Definition at line 130 of file BranchProbability.h.
|
inline |
Definition at line 137 of file BranchProbability.h.
|
inline |
Definition at line 184 of file BranchProbability.h.
|
inline |
Definition at line 196 of file BranchProbability.h.
|
inline |
Definition at line 181 of file BranchProbability.h.
|
inline |
Definition at line 190 of file BranchProbability.h.
|
inline |
Definition at line 202 of file BranchProbability.h.
raw_ostream & BranchProbability::print | ( | raw_ostream & | OS | ) | const |
Definition at line 25 of file BranchProbability.cpp.
References llvm::format(), isUnknown(), OS, and llvm::Percent.
Referenced by dump(), and llvm::operator<<().
Scale a large integer.
Scales Num
. Guarantees full precision. Returns the floor of the result.
Num
times this
. Definition at line 107 of file BranchProbability.cpp.
Referenced by llvm::ARMBaseInstrInfo::isProfitableToIfCvt(), llvm::BlockFrequency::operator*=(), and scaleCaseProbality().
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 111 of file BranchProbability.cpp.
Referenced by llvm::BlockFrequency::operator/=().