LLVM 20.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 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 30 of file BranchProbability.h.
|
inline |
Definition at line 43 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 69 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 66 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 65 of file BranchProbability.h.
References N.
Referenced by llvm::AsmPrinter::emitBBAddrMapSection(), getAdjustedProbability(), llvm::BFIDOTGraphTraitsBase< BlockFrequencyInfoT, BranchProbabilityInfoT >::getEdgeAttributes(), llvm::getWeightFromBranchProb(), llvm::MIPrinter::print(), llvm::MachineBasicBlock::print(), scaleCaseProbality(), and updatePredecessorProfileMetadata().
|
inlinestatic |
Definition at line 50 of file BranchProbability.h.
References BranchProbability().
Referenced by llvm::X86FrameLowering::adjustForSegmentedStacks(), llvm::PPCTargetLowering::emitEHSjLjSetJmp(), getAdjustedProbability(), and scaleCaseProbality().
|
inlinestatic |
Definition at line 54 of file BranchProbability.h.
References BranchProbability(), and N.
Referenced by decodeBBAddrMapImpl(), and normalizeProbabilities().
|
inlinestatic |
Definition at line 51 of file BranchProbability.h.
References BranchProbability().
Referenced by splitMBB(), and llvm::MachineBasicBlock::splitSuccessor().
|
inlinestatic |
Definition at line 49 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 47 of file BranchProbability.h.
References N.
Referenced by normalizeProbabilities(), print(), llvm::MachineBasicBlock::setSuccProbability(), shouldFoldCondBranchesToCommonDestination(), and splitMBB().
|
inline |
Definition at line 46 of file BranchProbability.h.
References N.
|
static |
Definition at line 205 of file BranchProbability.h.
References End, getDenominator(), getRaw(), getZero(), I, and isUnknown().
Referenced by llvm::SelectionDAGBuilder::FindMergedConditions(), and llvm::MachineBasicBlock::normalizeSuccProbs().
|
inline |
Definition at line 173 of file BranchProbability.h.
References RHS.
|
inline |
Definition at line 148 of file BranchProbability.h.
References RHS.
|
inline |
Definition at line 154 of file BranchProbability.h.
References RHS.
|
inline |
Definition at line 107 of file BranchProbability.h.
|
inline |
Definition at line 114 of file BranchProbability.h.
|
inline |
Definition at line 136 of file BranchProbability.h.
References RHS.
|
inline |
Definition at line 91 of file BranchProbability.h.
|
inline |
Definition at line 142 of file BranchProbability.h.
References RHS.
|
inline |
Definition at line 99 of file BranchProbability.h.
|
inline |
Definition at line 160 of file BranchProbability.h.
References RHS.
|
inline |
Definition at line 166 of file BranchProbability.h.
References RHS.
|
inline |
Definition at line 121 of file BranchProbability.h.
|
inline |
Definition at line 128 of file BranchProbability.h.
|
inline |
Definition at line 175 of file BranchProbability.h.
|
inline |
Definition at line 187 of file BranchProbability.h.
|
inline |
Definition at line 172 of file BranchProbability.h.
|
inline |
Definition at line 181 of file BranchProbability.h.
|
inline |
Definition at line 193 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/=().