Home
last modified time | relevance | path

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

12

/external/llvm/include/llvm/Support/
DBranchProbability.h31 class BranchProbability {
41 explicit BranchProbability(uint32_t n) : N(n) {} in BranchProbability() function
44 BranchProbability() : N(UnknownN) {} in BranchProbability() function
45 BranchProbability(uint32_t Numerator, uint32_t Denominator);
50 static BranchProbability getZero() { return BranchProbability(0); } in getZero()
51 static BranchProbability getOne() { return BranchProbability(D); } in getOne()
52 static BranchProbability getUnknown() { return BranchProbability(UnknownN); } in getUnknown()
55 static BranchProbability getRaw(uint32_t N) { return BranchProbability(N); } in getRaw()
57 static BranchProbability getBranchProbability(uint64_t Numerator,
75 BranchProbability getCompl() const { return BranchProbability(D - N); } in getCompl()
[all …]
DBlockFrequency.h40 BlockFrequency &operator*=(BranchProbability Prob);
41 BlockFrequency operator*(BranchProbability Prob) const;
45 BlockFrequency &operator/=(BranchProbability Prob);
46 BlockFrequency operator/(BranchProbability Prob) const;
/external/llvm/unittests/Support/
DBranchProbabilityTest.cpp17 void PrintTo(BranchProbability P, ::std::ostream *os) { in PrintTo()
23 typedef BranchProbability BP;
291 const auto UnknownProb = BranchProbability::getUnknown(); in TEST()
293 SmallVector<BranchProbability, 2> Probs{{0, 1}, {0, 1}}; in TEST()
294 BranchProbability::normalizeProbabilities(Probs.begin(), Probs.end()); in TEST()
295 EXPECT_EQ(BranchProbability::getDenominator() / 2, Probs[0].getNumerator()); in TEST()
296 EXPECT_EQ(BranchProbability::getDenominator() / 2, Probs[1].getNumerator()); in TEST()
299 SmallVector<BranchProbability, 2> Probs{{0, 1}, {1, 1}}; in TEST()
300 BranchProbability::normalizeProbabilities(Probs.begin(), Probs.end()); in TEST()
302 EXPECT_EQ(BranchProbability::getDenominator(), Probs[1].getNumerator()); in TEST()
[all …]
DBlockFrequencyTest.cpp22 BranchProbability Prob(UINT32_MAX / 3, UINT32_MAX); in TEST()
33 BranchProbability Prob(UINT32_MAX, UINT32_MAX); in TEST()
44 BranchProbability Prob(3000000, 9000000); in TEST()
55 BranchProbability Prob(UINT32_MAX / 2, UINT32_MAX); in TEST()
68 BranchProbability Prob(P, P); in TEST()
79 BranchProbability Prob(UINT32_MAX, UINT32_MAX); in TEST()
99 Freq /= BranchProbability(1, 2); in TEST()
105 Freq /= BranchProbability(100, 300); in TEST()
107 Freq /= BranchProbability(1, 2); in TEST()
111 Freq /= BranchProbability(10000, 170000); in TEST()
[all …]
/external/llvm/lib/Support/
DBranchProbability.cpp22 const uint32_t BranchProbability::D;
24 raw_ostream &BranchProbability::print(raw_ostream &OS) const { in print()
35 void BranchProbability::dump() const { print(dbgs()) << '\n'; } in dump()
37 BranchProbability::BranchProbability(uint32_t Numerator, uint32_t Denominator) { in BranchProbability() function in BranchProbability
49 BranchProbability
50 BranchProbability::getBranchProbability(uint64_t Numerator, in getBranchProbability()
59 return BranchProbability(Numerator >> Scale, Denominator); in getBranchProbability()
108 uint64_t BranchProbability::scale(uint64_t Num) const { in scale()
112 uint64_t BranchProbability::scaleByInverse(uint64_t Num) const { in scaleByInverse()
DBlockFrequency.cpp20 BlockFrequency &BlockFrequency::operator*=(BranchProbability Prob) { in operator *=()
25 BlockFrequency BlockFrequency::operator*(BranchProbability Prob) const { in operator *()
31 BlockFrequency &BlockFrequency::operator/=(BranchProbability Prob) { in operator /=()
36 BlockFrequency BlockFrequency::operator/(BranchProbability Prob) const { in operator /()
DAndroid.mk14 BranchProbability.cpp \
/external/llvm/lib/CodeGen/
DMachineBranchProbabilityInfo.cpp31 BranchProbability MachineBranchProbabilityInfo::getEdgeProbability( in getEdgeProbability()
37 BranchProbability MachineBranchProbabilityInfo::getEdgeProbability( in getEdgeProbability()
49 static BranchProbability HotProb(4, 5); in isEdgeHot()
55 auto MaxProb = BranchProbability::getZero(); in getHotSucc()
66 static BranchProbability HotProb(4, 5); in getHotSucc()
77 const BranchProbability Prob = getEdgeProbability(Src, Dst); in printEdgeProbability()
DMachineBlockPlacement.cpp380 const BranchProbability HotProb(4, 5); // 80% in selectBestSuccessor()
383 auto BestProb = BranchProbability::getZero(); in selectBestSuccessor()
401 auto AdjustedSumProb = BranchProbability::getOne(); in selectBestSuccessor()
426 BranchProbability SuccProb; in selectBestSuccessor()
430 SuccProb = BranchProbability::getOne(); in selectBestSuccessor()
432 SuccProb = BranchProbability(SuccProbN, SuccProbD); in selectBestSuccessor()
764 BranchProbability Bias(100 - ExitBlockBias, 100); in findBestLoopExit()
870 return Freq / BranchProbability(1, Scale); in rotateLoopWithProfile()
898 auto LargestExitEdgeProb = BranchProbability::getZero(); in rotateLoopWithProfile()
907 if (LargestExitEdgeProb > BranchProbability::getZero()) { in rotateLoopWithProfile()
[all …]
DIfConversion.cpp194 BranchProbability Prediction) const;
197 BranchProbability Prediction) const;
222 BranchProbability Prediction) const { in MeetIfcvtSizeLimit()
231 BranchProbability Prediction) const { in MeetIfcvtSizeLimit()
478 BranchProbability Prediction) const { in ValidSimple()
505 BranchProbability Prediction) const { in ValidTriangle()
848 BranchProbability Prediction = MBPI->getEdgeProbability(BB, TrueBBI.BB); in AnalyzeBlock()
1211 BranchProbability CvtNext, CvtFalse, BBNext, BBCvt; in IfConvertTriangle()
1505 BBI.BB->addSuccessor(TailBB, BranchProbability::getOne()); in IfConvertDiamond()
1677 auto To2FromProb = BranchProbability::getZero(); in MergeBlocks()
[all …]
DMachineBasicBlock.cpp518 assert((uint64_t)std::abs(Sum - BranchProbability::getDenominator()) <= in validateSuccProbs()
525 BranchProbability Prob) { in addSuccessor()
1133 BranchProbability
1136 return BranchProbability(1, succ_size()); in getSuccProbability()
1143 auto Sum = BranchProbability::getZero(); in getSuccProbability()
1157 BranchProbability Prob) { in setSuccProbability()
/external/llvm/lib/CodeGen/SelectionDAG/
DSelectionDAGBuilder.h157 BranchProbability Prob;
160 MachineBasicBlock *MBB, BranchProbability Prob) { in range()
172 BranchProbability Prob) { in jumpTable()
183 unsigned BTCasesIndex, BranchProbability Prob) { in bitTests()
201 BranchProbability ExtraProb;
204 BranchProbability Prob): in CaseBits()
222 BranchProbability trueprob = BranchProbability::getUnknown(),
223 BranchProbability falseprob = BranchProbability::getUnknown())
243 BranchProbability TrueProb, FalseProb;
275 BranchProbability Prob): in BitTestCase()
[all …]
/external/llvm/include/llvm/Analysis/
DBranchProbabilityInfo.h55 BranchProbability getEdgeProbability(const BasicBlock *Src,
61 BranchProbability getEdgeProbability(const BasicBlock *Src,
64 BranchProbability getEdgeProbability(const BasicBlock *Src,
118 static BranchProbability getBranchProbStackProtector(bool IsLikely) { in getBranchProbStackProtector()
119 static const BranchProbability LikelyProb((1u << 20) - 1, 1u << 20); in getBranchProbStackProtector()
DBlockFrequencyInfoImpl.h103 BlockMass &operator*=(BranchProbability P) {
131 inline BlockMass operator*(BlockMass L, BranchProbability R) {
134 inline BlockMass operator*(BranchProbability L, BlockMass R) {
1084 Mass = Remaining * BranchProbability(1, Loop.NumHeaders - H);
1178 inline uint32_t getWeightFromBranchProb(const BranchProbability Prob) {
/external/llvm/lib/Analysis/
DBranchProbabilityInfo.cpp553 return getEdgeProbability(Src, Dst) > BranchProbability(4, 5); in isEdgeHot()
576 if (BranchProbability(MaxWeight, Sum) > BranchProbability(4, 5)) in getHotSucc()
631 BranchProbability BranchProbabilityInfo::
639 return BranchProbability::getOne(); in getEdgeProbability()
641 return BranchProbability(N, D); in getEdgeProbability()
646 BranchProbability BranchProbabilityInfo::
655 return BranchProbability::getOne(); in getEdgeProbability()
657 return BranchProbability(N, D); in getEdgeProbability()
660 BranchProbability
671 const BranchProbability Prob = getEdgeProbability(Src, Dst); in printEdgeProbability()
/external/mesa3d/src/gallium/drivers/radeon/
DR600InstrInfo.h81 const BranchProbability &Probability) const;
85 const BranchProbability &Probability) const ;
92 const BranchProbability &Probability) const;
DR600InstrInfo.cpp370 const BranchProbability &Probability) const{ in isProfitableToIfCvt()
381 const BranchProbability &Probability) const in isProfitableToIfCvt()
389 const BranchProbability &Probability) in isProfitableToDupForIfCvt()
/external/llvm/include/llvm/CodeGen/
DMachineBranchProbabilityInfo.h49 BranchProbability getEdgeProbability(const MachineBasicBlock *Src,
54 BranchProbability
DMachineBasicBlock.h97 std::vector<BranchProbability> Probs;
98 typedef std::vector<BranchProbability>::iterator probability_iterator;
99 typedef std::vector<BranchProbability>::const_iterator
445 BranchProbability Prob = BranchProbability::getUnknown());
454 void setSuccProbability(succ_iterator I, BranchProbability Prob);
462 BranchProbability::normalizeProbabilities(Probs.begin(), Probs.end());
760 BranchProbability getSuccProbability(const_succ_iterator Succ) const;
/external/llvm/lib/Target/PowerPC/
DPPCInstrInfo.h212 BranchProbability Probability) const override { in isProfitableToIfCvt()
220 BranchProbability Probability) const override;
223 BranchProbability Probability) const override { in isProfitableToDupForIfCvt()
/external/llvm/lib/Target/AMDGPU/
DR600InstrInfo.h177 BranchProbability Probability) const override;
181 BranchProbability Probability) const override ;
188 BranchProbability Probability) const override;
/external/llvm/lib/Target/Hexagon/
DHexagonInstrInfo.h113 BranchProbability Probability) const override;
125 BranchProbability Probability) const override;
134 BranchProbability Probability) const override;
/external/llvm/lib/Target/SystemZ/
DSystemZInstrInfo.h162 BranchProbability Probability) const override;
167 BranchProbability Probability) const override;
/external/llvm/lib/Target/ARM/
DARMBaseInstrInfo.h236 BranchProbability Probability) const override;
241 BranchProbability Probability) const override;
244 BranchProbability Probability) const override { in isProfitableToDupForIfCvt()
/external/llvm/include/llvm/Target/
DTargetInstrInfo.h587 BranchProbability Probability) const { in isProfitableToIfCvt()
602 BranchProbability Probability) const { in isProfitableToIfCvt()
614 BranchProbability Probability) const { in isProfitableToDupForIfCvt()

12