Home
last modified time | relevance | path

Searched refs:BranchProbability (Results 1 – 25 of 68) sorted by relevance

123

/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/
DBranchProbability.h30 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 …]
DBlockFrequency.h39 BlockFrequency &operator*=(BranchProbability Prob);
40 BlockFrequency operator*(BranchProbability Prob) const;
44 BlockFrequency &operator/=(BranchProbability Prob);
45 BlockFrequency operator/(BranchProbability Prob) const;
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/CodeGen/
DSwitchLoweringUtils.h45 BranchProbability Prob;
48 MachineBasicBlock *MBB, BranchProbability Prob) { in range()
59 unsigned JTCasesIndex, BranchProbability Prob) { in jumpTable()
70 unsigned BTCasesIndex, BranchProbability Prob) { in bitTests()
91 BranchProbability ExtraProb;
95 BranchProbability Prob) in CaseBits()
136 BranchProbability TrueProb, FalseProb;
142 BranchProbability trueprob = BranchProbability::getUnknown(),
143 BranchProbability falseprob = BranchProbability::getUnknown())
153 BranchProbability trueprob = BranchProbability::getUnknown(),
[all …]
DMachineBranchProbabilityInfo.h45 BranchProbability getEdgeProbability(const MachineBasicBlock *Src,
50 BranchProbability
DMachineBasicBlock.h95 std::vector<BranchProbability> Probs;
96 using probability_iterator = std::vector<BranchProbability>::iterator;
98 std::vector<BranchProbability>::const_iterator;
439 BranchProbability Prob = BranchProbability::getUnknown());
448 void setSuccProbability(succ_iterator I, BranchProbability Prob);
456 BranchProbability::normalizeProbabilities(Probs.begin(), Probs.end());
826 BranchProbability getSuccProbability(const_succ_iterator Succ) const;
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Support/
DBranchProbability.cpp22 const uint32_t BranchProbability::D;
24 raw_ostream &BranchProbability::print(raw_ostream &OS) const { in print()
36 LLVM_DUMP_METHOD void BranchProbability::dump() const { print(dbgs()) << '\n'; } in dump()
39 BranchProbability::BranchProbability(uint32_t Numerator, uint32_t Denominator) { in BranchProbability() function in BranchProbability
51 BranchProbability
52 BranchProbability::getBranchProbability(uint64_t Numerator, in getBranchProbability()
61 return BranchProbability(Numerator >> Scale, Denominator); in getBranchProbability()
106 uint64_t BranchProbability::scale(uint64_t Num) const { in scale()
110 uint64_t BranchProbability::scaleByInverse(uint64_t Num) const { in scaleByInverse()
DBlockFrequency.cpp18 BlockFrequency &BlockFrequency::operator*=(BranchProbability Prob) { in operator *=()
23 BlockFrequency BlockFrequency::operator*(BranchProbability Prob) const { in operator *()
29 BlockFrequency &BlockFrequency::operator/=(BranchProbability Prob) { in operator /=()
34 BlockFrequency BlockFrequency::operator/(BranchProbability Prob) const { in operator /()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DBranchProbabilityInfo.cpp105 static const BranchProbability UR_TAKEN_PROB = BranchProbability::getRaw(1);
254 BranchProbability Prob(1, UnreachableEdges.size()); in calcUnreachableHeuristics()
262 (BranchProbability::getOne() - UR_TAKEN_PROB * UnreachableEdges.size()) / in calcUnreachableHeuristics()
341 SmallVector<BranchProbability, 2> BP; in calcMetadataWeights()
348 auto ToDistribute = BranchProbability::getZero(); in calcMetadataWeights()
358 if (ToDistribute > BranchProbability::getZero()) { in calcMetadataWeights()
359 BranchProbability PerEdge = ToDistribute / ReachableIdxs.size(); in calcMetadataWeights()
400 BranchProbability Prob(1, ColdEdges.size()); in calcColdCallHeuristics()
406 auto ColdProb = BranchProbability::getBranchProbability( in calcColdCallHeuristics()
409 auto NormalProb = BranchProbability::getBranchProbability( in calcColdCallHeuristics()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/
DMachineBranchProbabilityInfo.cpp50 BranchProbability MachineBranchProbabilityInfo::getEdgeProbability( in getEdgeProbability()
56 BranchProbability MachineBranchProbabilityInfo::getEdgeProbability( in getEdgeProbability()
65 BranchProbability HotProb(StaticLikelyProb, 100); in isEdgeHot()
71 auto MaxProb = BranchProbability::getZero(); in getHotSucc()
82 BranchProbability HotProb(StaticLikelyProb, 100); in getHotSucc()
93 const BranchProbability Prob = getEdgeProbability(Src, Dst); in printEdgeProbability()
DMachineBlockPlacement.cpp415 BranchProbability
423 BranchProbability SuccProb, BranchProbability HotProb);
436 const BlockChain &SuccChain, BranchProbability SuccProb,
437 BranchProbability RealSuccProb, const BlockChain &Chain,
495 BranchProbability QProb,
507 BranchProbability AdjustedSumProb, const BlockChain &Chain,
636 BranchProbability MachineBlockPlacement::collectViableSuccessors( in collectViableSuccessors()
656 auto AdjustedSumProb = BranchProbability::getOne(); in collectViableSuccessors()
682 static BranchProbability
683 getAdjustedProbability(BranchProbability OrigProb, in getAdjustedProbability()
[all …]
DSwitchLoweringUtils.cpp194 auto Prob = BranchProbability::getZero(); in buildJumpTable()
197 DenseMap<MachineBasicBlock*, BranchProbability> JTProbs; in buildJumpTable()
201 JTProbs[Clusters[I].MBB] = BranchProbability::getZero(); in buildJumpTable()
414 auto TotalProb = BranchProbability::getZero(); in buildBitTests()
423 CaseBits(0, Clusters[i].MBB, 0, BranchProbability::getZero())); in buildBitTests()
DMachineBasicBlock.cpp374 const BranchProbability &BP = getSuccProbability(I); in print()
649 assert((uint64_t)std::abs(Sum - BranchProbability::getDenominator()) <= in validateSuccProbs()
656 BranchProbability Prob) { in addSuccessor()
687 addSuccessor(New, Probs.empty() ? BranchProbability::getUnknown() in splitSuccessor()
1328 BranchProbability
1331 return BranchProbability(1, succ_size()); in getSuccProbability()
1338 auto Sum = BranchProbability::getZero(); in getSuccProbability()
1352 BranchProbability Prob) { in setSuccProbability()
DIfConversion.cpp231 BranchProbability Prediction) const;
234 BranchProbability Prediction) const;
287 BranchProbability Prediction) const { in MeetIfcvtSizeLimit()
294 BranchProbability Prediction, bool Forked) const { in MeetIfcvtSizeLimit()
654 BranchProbability Prediction) const { in ValidSimple()
680 BranchProbability Prediction) const { in ValidTriangle()
1295 BranchProbability Prediction = MBPI->getEdgeProbability(BB, TrueBBI.BB); in AnalyzeBlock()
1673 BranchProbability CvtNext, CvtFalse, BBNext, BBCvt; in IfConvertTriangle()
2100 BBI.BB->addSuccessor(TailBB, BranchProbability::getOne()); in IfConvertDiamond()
2273 auto To2FromProb = BranchProbability::getZero(); in MergeBlocks()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Analysis/
DBranchProbabilityInfo.h88 BranchProbability getEdgeProbability(const BasicBlock *Src,
94 BranchProbability getEdgeProbability(const BasicBlock *Src,
97 BranchProbability getEdgeProbability(const BasicBlock *Src,
127 BranchProbability Prob);
129 static BranchProbability getBranchProbStackProtector(bool IsLikely) { in getBranchProbStackProtector()
130 static const BranchProbability LikelyProb((1u << 20) - 1, 1u << 20); in getBranchProbStackProtector()
180 DenseMap<Edge, BranchProbability> Probs;
DBlockFrequencyInfoImpl.h121 BlockMass &operator*=(BranchProbability P) {
149 inline BlockMass operator*(BlockMass L, BranchProbability R) {
152 inline BlockMass operator*(BranchProbability L, BlockMass R) {
1303 inline uint32_t getWeightFromBranchProb(const BranchProbability Prob) {
1401 BranchProbability::getBranchProbability(HotPercentThreshold, 100));
1451 BranchProbability BP = BPI->getEdgeProbability(Node, EI);
1461 BranchProbability(HotPercentThreshold, 100);
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/SelectionDAG/
DSelectionDAGBuilder.h184 BranchProbability &PeeledCaseProb);
404 BranchProbability Prob = BranchProbability::getUnknown()) override {
548 Instruction::BinaryOps Opc, BranchProbability TProb,
549 BranchProbability FProb, bool InvertCond);
554 BranchProbability TProb, BranchProbability FProb,
662 BranchProbability getEdgeProbability(const MachineBasicBlock *Src,
666 BranchProbability Prob = BranchProbability::getUnknown());
676 BranchProbability BranchProbToNext, unsigned Reg,
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Instrumentation/
DControlHeightReduction.cpp393 Value *&MergedCondition, BranchProbability &CHRBranchBias);
397 Value *&MergedCondition, BranchProbability &CHRBranchBias);
421 DenseMap<Region *, BranchProbability> BranchBiasMap;
423 DenseMap<SelectInst *, BranchProbability> SelectBiasMap;
610 static bool checkMDProf(MDNode *MD, BranchProbability &TrueProb, in checkMDProf()
611 BranchProbability &FalseProb) { in checkMDProf()
632 TrueProb = BranchProbability::getBranchProbability(TrueWt, SumWt); in checkMDProf()
633 FalseProb = BranchProbability::getBranchProbability(FalseWt, SumWt); in checkMDProf()
637 static BranchProbability getCHRBiasThreshold() { in getCHRBiasThreshold()
638 return BranchProbability::getBranchProbability( in getCHRBiasThreshold()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/CodeGen/GlobalISel/
DIRTranslator.h309 BranchProbability UnhandledProbs,
318 BranchProbability UnhandledProbs,
538 BranchProbability Prob = BranchProbability::getUnknown()) override {
611 BranchProbability getEdgeProbability(const MachineBasicBlock *Src,
615 BranchProbability Prob);
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/SystemZ/
DSystemZInstrInfo.h235 BranchProbability Probability) const override;
240 BranchProbability Probability) const override;
242 BranchProbability Probability) const override;
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AMDGPU/
DR600InstrInfo.h185 BranchProbability Probability) const override;
189 BranchProbability Probability) const override ;
195 BranchProbability Probability) const override;
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/IPO/
DPartialInlining.cpp283 BranchProbability getOutliningCallBBRelativeFreq(FunctionCloner &Cloner);
461 BranchProbability MinBranchProbability( in computeOutliningColdRegionsInfo()
491 BranchProbability SuccProb = BPI.getEdgeProbability(thisBB, *SI); in computeOutliningColdRegionsInfo()
721 BranchProbability
734 auto OutlineRegionRelFreq = BranchProbability::getBranchProbability( in getOutliningCallBBRelativeFreq()
752 if (OutlineRegionRelFreq < BranchProbability(45, 100)) in getOutliningCallBBRelativeFreq()
756 OutlineRegionRelFreq, BranchProbability(OutlineRegionFreqPercent, 100)); in getOutliningCallBBRelativeFreq()
1344 BranchProbability RelativeToEntryFreq; in tryPartialInline()
1353 RelativeToEntryFreq = BranchProbability(0, 1); in tryPartialInline()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/PowerPC/
DPPCInstrInfo.h315 BranchProbability Probability) const override { in isProfitableToIfCvt()
323 BranchProbability Probability) const override;
326 BranchProbability Probability) const override { in isProfitableToDupForIfCvt()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/Hexagon/
DHexagonInstrInfo.h144 BranchProbability Probability) const override;
156 BranchProbability Probability) const override;
165 BranchProbability Probability) const override;
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AArch64/
DAArch64ConditionalCompares.cpp580 BranchProbability Head2CmpBB = MBPI->getEdgeProbability(Head, CmpBB); in convert()
581 BranchProbability CmpBB2Tail = MBPI->getEdgeProbability(CmpBB, Tail); in convert()
596 BranchProbability Head2Tail = MBPI->getEdgeProbability(Head, Tail); in convert()
606 BranchProbability CmpBB2I = MBPI->getEdgeProbability(CmpBB, *I); in convert()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Target/Mips/
DMipsExpandPseudo.cpp132 BB.addSuccessor(loop1MBB, BranchProbability::getOne()); in expandAtomicCmpSwapSubword()
139 sinkMBB->addSuccessor(exitMBB, BranchProbability::getOne()); in expandAtomicCmpSwapSubword()
267 BB.addSuccessor(loop1MBB, BranchProbability::getOne()); in expandAtomicCmpSwap()
432 BB.addSuccessor(loopMBB, BranchProbability::getOne()); in expandAtomicBinOpSubword()
547 sinkMBB->addSuccessor(exitMBB, BranchProbability::getOne()); in expandAtomicBinOpSubword()
724 BB.addSuccessor(loopMBB, BranchProbability::getOne()); in expandAtomicBinOp()

123