/freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
H A D | BranchProbability.h | 30 class BranchProbability { 40 explicit BranchProbability(uint32_t n) : N(n) {} in BranchProbability() function 43 BranchProbability() : N(UnknownN) {} in BranchProbability() function 44 BranchProbability(uint32_t Numerator, uint32_t Denominator); 49 static BranchProbability getZero() { return BranchProbability(0); } in getZero() 50 static BranchProbability getOne() { return BranchProbability(D); } in getOne() 51 static BranchProbability getUnknown() { return BranchProbability(UnknownN); } in getUnknown() 54 static BranchProbability getRaw(uint32_t N) { return BranchProbability(N); } in getRaw() 56 static BranchProbability getBranchProbability(uint64_t Numerator, 69 BranchProbability getCompl() const { return BranchProbability(D - N); } in getCompl() [all …]
|
H A D | BlockFrequency.h | 23 class BranchProbability; variable 42 BlockFrequency &operator*=(BranchProbability Prob); 43 BlockFrequency operator*(BranchProbability Prob) const; 47 BlockFrequency &operator/=(BranchProbability Prob); 48 BlockFrequency operator/(BranchProbability Prob) const;
|
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/ |
H A D | SwitchLoweringUtils.h | 16 #include "llvm/Support/BranchProbability.h" 50 BranchProbability Prob; 53 MachineBasicBlock *MBB, BranchProbability Prob) { in range() 64 unsigned JTCasesIndex, BranchProbability Prob) { in jumpTable() 75 unsigned BTCasesIndex, BranchProbability Prob) { in bitTests() 96 BranchProbability ExtraProb; 100 BranchProbability Prob) in CaseBits() 141 BranchProbability TrueProb, FalseProb; 147 BranchProbability trueprob = BranchProbability [all...] |
H A D | MachineBranchProbabilityInfo.h | 37 BranchProbability getEdgeProbability(const MachineBasicBlock *Src, 42 BranchProbability
|
H A D | MachineBasicBlock.h | 166 std::vector<BranchProbability> Probs; 167 using probability_iterator = std::vector<BranchProbability>::iterator; 169 std::vector<BranchProbability>::const_iterator; 745 BranchProbability Prob = BranchProbability::getUnknown()); 754 void setSuccProbability(succ_iterator I, BranchProbability Prob); 762 BranchProbability::normalizeProbabilities(Probs.begin(), Probs.end()); 1232 BranchProbability getSuccProbability(const_succ_iterator Succ) const;
|
/freebsd/contrib/llvm-project/llvm/lib/Support/ |
H A D | BranchProbability.cpp | 23 constexpr uint32_t BranchProbability::D; 25 raw_ostream &BranchProbability::print(raw_ostream &OS) const { in print() 37 LLVM_DUMP_METHOD void BranchProbability::dump() const { print(dbgs()) << '\n'; } in dump() 40 BranchProbability::BranchProbability(uint32_t Numerator, uint32_t Denominator) { in BranchProbability() function in BranchProbability 52 BranchProbability 53 BranchProbability::getBranchProbability(uint64_t Numerator, in getBranchProbability() 62 return BranchProbability(Numerator >> Scale, Denominator); in getBranchProbability() 107 uint64_t BranchProbability::scale(uint64_t Num) const { in scale() 111 uint64_t BranchProbability::scaleByInverse(uint64_t Num) const { in scaleByInverse()
|
H A D | BlockFrequency.cpp | 21 BlockFrequency &BlockFrequency::operator*=(BranchProbability Prob) { in operator *=() 26 BlockFrequency BlockFrequency::operator*(BranchProbability Prob) const { in operator *() 32 BlockFrequency &BlockFrequency::operator/=(BranchProbability Prob) { in operator /=() 37 BlockFrequency BlockFrequency::operator/(BranchProbability Prob) const { in operator /()
|
/freebsd/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | BranchProbabilityInfo.cpp | 108 static const BranchProbability UR_TAKEN_PROB = BranchProbability::getRaw(1); 114 static const BranchProbability 116 static const BranchProbability 119 using ProbabilityList = SmallVector<BranchProbability>; 131 static const BranchProbability 133 static const BranchProbability 181 static const BranchProbability FPOrdTakenProb(FPH_ORD_WEIGHT, 183 static const BranchProbability 185 static const BranchProbability 187 static const BranchProbability [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/GlobalISel/ |
H A D | IRTranslator.h | 314 const BasicBlock *EHPadBB, BranchProbability Prob, 315 SmallVectorImpl<std::pair<MachineBasicBlock *, BranchProbability>> 370 BranchProbability TProb, 371 BranchProbability FProb, bool InvertCond); 377 Instruction::BinaryOps Opc, BranchProbability TProb, 378 BranchProbability FProb, bool InvertCond); 399 BranchProbability BranchProbToNext, Register Reg, 410 BranchProbability UnhandledProbs, SwitchCG::CaseClusterIt I, 416 BranchProbability UnhandledProbs, 425 BranchProbability DefaultProb, BranchProbability UnhandledProbs, [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | MachineBlockPlacement.cpp | 471 BranchProbability 495 const BlockChain &SuccChain, BranchProbability SuccProb, 496 BranchProbability RealSuccProb, const BlockChain &Chain, 557 BranchProbability QProb, 569 BranchProbability AdjustedSumProb, const BlockChain &Chain, 707 BranchProbability MachineBlockPlacement::collectViableSuccessors( in collectViableSuccessors() 727 auto AdjustedSumProb = BranchProbability::getOne(); in collectViableSuccessors() 753 static BranchProbability 754 getAdjustedProbability(BranchProbability OrigProb, in getAdjustedProbability() 755 BranchProbability AdjustedSumProb) { in getAdjustedProbability() [all …]
|
H A D | MachineBranchProbabilityInfo.cpp | 82 BranchProbability MachineBranchProbabilityInfo::getEdgeProbability( in getEdgeProbability() 88 BranchProbability MachineBranchProbabilityInfo::getEdgeProbability( in getEdgeProbability() 97 BranchProbability HotProb(StaticLikelyProb, 100); in isEdgeHot() 105 const BranchProbability Prob = getEdgeProbability(Src, Dst); in printEdgeProbability()
|
H A D | MIRSampleProfile.cpp | 250 BranchProbability OldProb = BFI->getMBPI()->getEdgeProbability(BB, SI); in setBranchProbs() 251 BranchProbability NewProb(EdgeWeight, BBWeight); in setBranchProbs() 259 BranchProbability Diff; in setBranchProbs() 264 Show = (Diff >= BranchProbability(FSProfileDebugProbDiffThreshold, 100)); in setBranchProbs()
|
H A D | SwitchLoweringUtils.cpp | 200 auto Prob = BranchProbability::getZero(); in buildJumpTable() 203 DenseMap<MachineBasicBlock*, BranchProbability> JTProbs; in buildJumpTable() 207 JTProbs[Clusters[I].MBB] = BranchProbability::getZero(); in buildJumpTable() 420 auto TotalProb = BranchProbability::getZero(); in buildBitTests() 429 CaseBits(0, Clusters[i].MBB, 0, BranchProbability::getZero())); in buildBitTests()
|
H A D | IfConversion.cpp | 228 BranchProbability Prediction) const; 231 BranchProbability Prediction) const; 284 BranchProbability Prediction) const { in MeetIfcvtSizeLimit() 291 BranchProbability Prediction, bool Forked) const { in MeetIfcvtSizeLimit() 644 BranchProbability Prediction) const { in ValidSimple() 670 BranchProbability Prediction) const { in ValidTriangle() 1290 BranchProbability Prediction = MBPI->getEdgeProbability(BB, TrueBBI.BB); in AnalyzeBlock() 1658 BranchProbability CvtNext, CvtFalse, BBNext, BBCvt; in IfConvertTriangle() 2083 BBI.BB->addSuccessor(TailBB, BranchProbability::getOne()); in IfConvertDiamond() 2239 ToBBI.BB->addSuccessor(MO.getMBB(), BranchProbability::getZero()); in MergeBlocks() [all …]
|
H A D | MachineBasicBlock.cpp | 408 const BranchProbability &BP = getSuccProbability(I); in print() 790 assert((uint64_t)std::abs(Sum - BranchProbability::getDenominator()) <= in validateSuccProbs() 797 BranchProbability Prob) { in addSuccessor() 828 addSuccessor(New, Probs.empty() ? BranchProbability::getUnknown() in splitSuccessor() 1573 BranchProbability 1576 return BranchProbability(1, succ_size()); in getSuccProbability() 1583 auto Sum = BranchProbability::getZero(); in getSuccProbability() 1597 BranchProbability Prob) { in setSuccProbability()
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/ |
H A D | BranchProbabilityInfo.h | 158 BranchProbability getEdgeProbability(const BasicBlock *Src, 164 BranchProbability getEdgeProbability(const BasicBlock *Src, 167 BranchProbability getEdgeProbability(const BasicBlock *Src, 191 const SmallVectorImpl<BranchProbability> &Probs); 202 static BranchProbability getBranchProbStackProtector(bool IsLikely) { in getBranchProbStackProtector() 203 static const BranchProbability LikelyProb((1u << 20) - 1, 1u << 20); in getBranchProbStackProtector() 330 DenseMap<Edge, BranchProbability> Probs;
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/ |
H A D | SelectionDAGBuilder.h | 217 BranchProbability &PeeledCaseProb); 239 BranchProbability Prob = BranchProbability::getUnknown()) override { 396 Instruction::BinaryOps Opc, BranchProbability TProb, 397 BranchProbability FProb, bool InvertCond); 402 BranchProbability TProb, BranchProbability FProb, 515 BranchProbability getEdgeProbability(const MachineBasicBlock *Src, 519 BranchProbability Prob = BranchProbability::getUnknown()); 529 BranchProbability BranchProbToNext, unsigned Reg,
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/ |
H A D | ControlHeightReduction.cpp | 354 Value *&MergedCondition, BranchProbability &CHRBranchBias); 356 Value *&MergedCondition, BranchProbability &CHRBranchBias); 390 DenseMap<Region *, BranchProbability> BranchBiasMap; 392 DenseMap<SelectInst *, BranchProbability> SelectBiasMap; 582 BranchProbability &TrueProb, in extractBranchProbabilities() 583 BranchProbability &FalseProb) { in extractBranchProbabilities() 597 TrueProb = BranchProbability::getBranchProbability(TrueWeight, SumWeight); in extractBranchProbabilities() 598 FalseProb = BranchProbability::getBranchProbability(FalseWeight, SumWeight); in extractBranchProbabilities() 602 static BranchProbability getCHRBiasThreshold() { in getCHRBiasThreshold() 603 return BranchProbability::getBranchProbability( in getCHRBiasThreshold() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/ |
H A D | R600InstrInfo.h | 184 BranchProbability Probability) const override; 188 BranchProbability Probability) const override ; 194 BranchProbability Probability) const override;
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/IPO/ |
H A D | HotColdSplitting.cpp | 113 BranchProbability ColdProbThresh, in analyzeProfMetadata() 128 auto TrueProb = BranchProbability::getBranchProbability(TrueWt, SumWt); in analyzeProfMetadata() 129 auto FalseProb = BranchProbability::getBranchProbability(FalseWt, SumWt); in analyzeProfMetadata() 234 BasicBlock *BB, BranchProbability ColdProbThresh, in isBasicBlockCold() 676 ColdProbThresh = BranchProbability(1, ColdBranchProbDenom.getValue()); in outlineColdRegions()
|
H A D | PartialInlining.cpp | 277 BranchProbability 410 BranchProbability MinBranchProbability( in computeOutliningColdRegionsInfo() 441 BranchProbability SuccProb = BPI.getEdgeProbability(ThisBB, *SI); in computeOutliningColdRegionsInfo() 678 BranchProbability PartialInlinerImpl::getOutliningCallBBRelativeFreq( in getOutliningCallBBRelativeFreq() 691 auto OutlineRegionRelFreq = BranchProbability::getBranchProbability( in getOutliningCallBBRelativeFreq() 709 if (OutlineRegionRelFreq < BranchProbability(45, 100)) in getOutliningCallBBRelativeFreq() 713 OutlineRegionRelFreq, BranchProbability(OutlineRegionFreqPercent, 100)); in getOutliningCallBBRelativeFreq() 1316 BranchProbability RelativeToEntryFreq; in tryPartialInline() 1325 RelativeToEntryFreq = BranchProbability(0, 1); in tryPartialInline()
|
/freebsd/contrib/llvm-project/llvm/lib/Target/SystemZ/ |
H A D | SystemZInstrInfo.h | 267 BranchProbability Probability) const override; 272 BranchProbability Probability) const override; 274 BranchProbability Probability) const override;
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/GlobalISel/ |
H A D | IRTranslator.cpp | 386 BranchProbability TProb, BranchProbability FProb, bool InvertCond) { in emitBranchForMergedCondition() 422 Instruction::BinaryOps Opc, BranchProbability TProb, in findMergedConditions() 423 BranchProbability FProb, bool InvertCond) { in findMergedConditions() 504 SmallVector<BranchProbability, 2> Probs{TProb / 2, FProb}; in findMergedConditions() 505 BranchProbability::normalizeProbabilities(Probs.begin(), Probs.end()); in findMergedConditions() 537 SmallVector<BranchProbability, 2> Probs{TProb, FProb / 2}; in findMergedConditions() 538 BranchProbability::normalizeProbabilities(Probs.begin(), Probs.end()); in findMergedConditions() 667 BranchProbability Prob) { in addSuccessorWithProb() 677 BranchProbability 686 return BranchProbability(1, SuccSize); in getEdgeProbability() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/ |
H A D | HexagonInstrInfo.h | 144 BranchProbability Probability) const override; 156 BranchProbability Probability) const override; 165 BranchProbability Probability) const override;
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/ |
H A D | AArch64ConditionalCompares.cpp | 578 BranchProbability Head2CmpBB = MBPI->getEdgeProbability(Head, CmpBB); in convert() 579 BranchProbability CmpBB2Tail = MBPI->getEdgeProbability(CmpBB, Tail); in convert() 594 BranchProbability Head2Tail = MBPI->getEdgeProbability(Head, Tail); in convert() 604 BranchProbability CmpBB2I = MBPI->getEdgeProbability(CmpBB, *I); in convert()
|