Home
last modified time | relevance | path

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

12345678

/external/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;
/external/llvm-project/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;
/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,
70 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-project/llvm/unittests/Support/
DBranchProbabilityTest.cpp16 void PrintTo(BranchProbability P, ::std::ostream *os) { in PrintTo()
22 typedef BranchProbability BP;
338 const auto UnknownProb = BranchProbability::getUnknown(); in TEST()
340 SmallVector<BranchProbability, 2> Probs{{0, 1}, {0, 1}}; in TEST()
341 BranchProbability::normalizeProbabilities(Probs.begin(), Probs.end()); in TEST()
342 EXPECT_EQ(BranchProbability::getDenominator() / 2, Probs[0].getNumerator()); in TEST()
343 EXPECT_EQ(BranchProbability::getDenominator() / 2, Probs[1].getNumerator()); in TEST()
346 SmallVector<BranchProbability, 2> Probs{{0, 1}, {1, 1}}; in TEST()
347 BranchProbability::normalizeProbabilities(Probs.begin(), Probs.end()); in TEST()
349 EXPECT_EQ(BranchProbability::getDenominator(), Probs[1].getNumerator()); in TEST()
[all …]
DBlockFrequencyTest.cpp21 BranchProbability Prob(UINT32_MAX / 3, UINT32_MAX); in TEST()
32 BranchProbability Prob(UINT32_MAX, UINT32_MAX); in TEST()
43 BranchProbability Prob(3000000, 9000000); in TEST()
54 BranchProbability Prob(UINT32_MAX / 2, UINT32_MAX); in TEST()
67 BranchProbability Prob(P, P); in TEST()
78 BranchProbability Prob(UINT32_MAX, UINT32_MAX); in TEST()
98 Freq /= BranchProbability(1, 2); in TEST()
104 Freq /= BranchProbability(100, 300); in TEST()
106 Freq /= BranchProbability(1, 2); in TEST()
110 Freq /= BranchProbability(10000, 170000); in TEST()
[all …]
/external/llvm-project/llvm/include/llvm/CodeGen/
DSwitchLoweringUtils.h50 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::getUnknown(),
148 BranchProbability falseprob = BranchProbability::getUnknown())
158 BranchProbability trueprob = BranchProbability::getUnknown(),
[all …]
/external/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 …]
/external/llvm-project/llvm/lib/Support/
DBranchProbability.cpp22 constexpr 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 /()
/external/llvm/lib/Support/
DBranchProbability.cpp22 const uint32_t BranchProbability::D;
24 raw_ostream &BranchProbability::print(raw_ostream &OS) const { in print()
35 LLVM_DUMP_METHOD 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()
/external/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()
/external/llvm-project/llvm/lib/Analysis/
DBranchProbabilityInfo.cpp106 static const BranchProbability UR_TAKEN_PROB = BranchProbability::getRaw(1);
412 SmallVector<BranchProbability, 4> EdgeProbabilities( in calcUnreachableHeuristics()
413 BB->getTerminator()->getNumSuccessors(), BranchProbability::getUnknown()); in calcUnreachableHeuristics()
415 BranchProbability Prob(1, UnreachableEdges.size()); in calcUnreachableHeuristics()
424 (BranchProbability::getOne() - UR_TAKEN_PROB * UnreachableEdges.size()) / in calcUnreachableHeuristics()
505 SmallVector<BranchProbability, 2> BP; in calcMetadataWeights()
542 BranchProbability NewUnreachableSum = BranchProbability::getZero(); in calcMetadataWeights()
546 BranchProbability NewReachableSum = in calcMetadataWeights()
547 BranchProbability::getOne() - NewUnreachableSum; in calcMetadataWeights()
549 BranchProbability OldReachableSum = BranchProbability::getZero(); in calcMetadataWeights()
[all …]
/external/llvm/lib/Analysis/
DBranchProbabilityInfo.cpp159 BranchProbability Prob(1, UnreachableEdges.size()); in calcUnreachableHeuristics()
165 BranchProbability UnreachableProb(UR_TAKEN_WEIGHT, in calcUnreachableHeuristics()
168 BranchProbability ReachableProb(UR_NONTAKEN_WEIGHT, in calcUnreachableHeuristics()
287 BranchProbability Prob(1, ColdEdges.size()); in calcColdCallHeuristics()
293 BranchProbability ColdProb(CC_TAKEN_WEIGHT, in calcColdCallHeuristics()
296 BranchProbability NormalProb(CC_NONTAKEN_WEIGHT, in calcColdCallHeuristics()
336 BranchProbability TakenProb(PH_TAKEN_WEIGHT, in calcPointerHeuristics()
369 BranchProbability Probs[] = {BranchProbability::getZero(), in calcLoopBranchHeuristics()
370 BranchProbability::getZero(), in calcLoopBranchHeuristics()
371 BranchProbability::getZero()}; in calcLoopBranchHeuristics()
[all …]
/external/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 …]
/external/llvm/lib/CodeGen/
DMachineBranchProbabilityInfo.cpp43 BranchProbability MachineBranchProbabilityInfo::getEdgeProbability( in getEdgeProbability()
49 BranchProbability MachineBranchProbabilityInfo::getEdgeProbability( in getEdgeProbability()
59 BranchProbability HotProb(StaticLikelyProb, 100); in isEdgeHot()
65 auto MaxProb = BranchProbability::getZero(); in getHotSucc()
76 BranchProbability HotProb(StaticLikelyProb, 100); in getHotSucc()
87 const BranchProbability Prob = getEdgeProbability(Src, Dst); in printEdgeProbability()
/external/llvm-project/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()
/external/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()
/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;
276 BranchProbability Prob): in BitTestCase()
[all …]
/external/llvm/include/llvm/Analysis/
DBranchProbabilityInfo.h71 BranchProbability getEdgeProbability(const BasicBlock *Src,
77 BranchProbability getEdgeProbability(const BasicBlock *Src,
80 BranchProbability getEdgeProbability(const BasicBlock *Src,
110 BranchProbability Prob);
112 static BranchProbability getBranchProbStackProtector(bool IsLikely) { in getBranchProbStackProtector()
113 static const BranchProbability LikelyProb((1u << 20) - 1, 1u << 20); in getBranchProbStackProtector()
135 DenseMap<Edge, BranchProbability> Probs;
/external/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;

12345678