Home
last modified time | relevance | path

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

123456

/external/swiftshader/third_party/llvm-7.0/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/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/swiftshader/third_party/llvm-7.0/llvm/unittests/Support/
DBranchProbabilityTest.cpp17 void PrintTo(BranchProbability P, ::std::ostream *os) { in PrintTo()
23 typedef BranchProbability BP;
339 const auto UnknownProb = BranchProbability::getUnknown(); in TEST()
341 SmallVector<BranchProbability, 2> Probs{{0, 1}, {0, 1}}; in TEST()
342 BranchProbability::normalizeProbabilities(Probs.begin(), Probs.end()); in TEST()
343 EXPECT_EQ(BranchProbability::getDenominator() / 2, Probs[0].getNumerator()); in TEST()
344 EXPECT_EQ(BranchProbability::getDenominator() / 2, Probs[1].getNumerator()); in TEST()
347 SmallVector<BranchProbability, 2> Probs{{0, 1}, {1, 1}}; in TEST()
348 BranchProbability::normalizeProbabilities(Probs.begin(), Probs.end()); in TEST()
350 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 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()
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 /()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Support/
DBranchProbability.cpp23 const 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()
111 uint64_t BranchProbability::scale(uint64_t Num) const { in scale()
115 uint64_t BranchProbability::scaleByInverse(uint64_t Num) const { in scaleByInverse()
DBlockFrequency.cpp19 BlockFrequency &BlockFrequency::operator*=(BranchProbability Prob) { in operator *=()
24 BlockFrequency BlockFrequency::operator*(BranchProbability Prob) const { in operator *()
30 BlockFrequency &BlockFrequency::operator/=(BranchProbability Prob) { in operator /=()
35 BlockFrequency BlockFrequency::operator/(BranchProbability Prob) const { in operator /()
/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-7.0/llvm/lib/Analysis/
DBranchProbabilityInfo.cpp97 static const BranchProbability UR_TAKEN_PROB = BranchProbability::getRaw(1);
225 BranchProbability Prob(1, UnreachableEdges.size()); in calcUnreachableHeuristics()
233 (BranchProbability::getOne() - UR_TAKEN_PROB * UnreachableEdges.size()) / in calcUnreachableHeuristics()
312 SmallVector<BranchProbability, 2> BP; in calcMetadataWeights()
319 auto ToDistribute = BranchProbability::getZero(); in calcMetadataWeights()
329 if (ToDistribute > BranchProbability::getZero()) { in calcMetadataWeights()
330 BranchProbability PerEdge = ToDistribute / ReachableIdxs.size(); in calcMetadataWeights()
371 BranchProbability Prob(1, ColdEdges.size()); in calcColdCallHeuristics()
377 auto ColdProb = BranchProbability::getBranchProbability( in calcColdCallHeuristics()
380 auto NormalProb = BranchProbability::getBranchProbability( in calcColdCallHeuristics()
[all …]
/external/swiftshader/third_party/LLVM/unittests/Support/
DBlockFrequencyTest.cpp14 BranchProbability Prob(UINT32_MAX - 1, UINT32_MAX); in TEST()
21 BranchProbability Prob(UINT32_MAX, UINT32_MAX); in TEST()
28 BranchProbability Prob(3000000, 9000000); in TEST()
35 BranchProbability Prob(UINT32_MAX / 2, UINT32_MAX); in TEST()
44 BranchProbability Prob(P, P); in TEST()
51 BranchProbability Prob(UINT32_MAX, UINT32_MAX); in TEST()
/external/swiftshader/third_party/LLVM/include/llvm/Support/
DBranchProbability.h24 class BranchProbability {
33 BranchProbability(uint32_t n, uint32_t d);
39 BranchProbability getCompl() { in getCompl()
40 return BranchProbability(D - N, D); in getCompl()
48 raw_ostream &operator<<(raw_ostream &OS, const BranchProbability &Prob);
/external/swiftshader/third_party/LLVM/lib/Support/
DBranchProbability.cpp20 BranchProbability::BranchProbability(uint32_t n, uint32_t d) { in BranchProbability() function in BranchProbability
27 void BranchProbability::print(raw_ostream &OS) const { in print()
31 void BranchProbability::dump() const { in dump()
38 raw_ostream &operator<<(raw_ostream &OS, const BranchProbability &Prob) { in operator <<()
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/
DMachineBranchProbabilityInfo.cpp43 BranchProbability MachineBranchProbabilityInfo::getEdgeProbability( in getEdgeProbability()
49 BranchProbability MachineBranchProbabilityInfo::getEdgeProbability( in getEdgeProbability()
58 BranchProbability HotProb(StaticLikelyProb, 100); in isEdgeHot()
64 auto MaxProb = BranchProbability::getZero(); in getHotSucc()
75 BranchProbability HotProb(StaticLikelyProb, 100); in getHotSucc()
86 const BranchProbability Prob = getEdgeProbability(Src, Dst); in printEdgeProbability()
DMachineBlockPlacement.cpp410 BranchProbability
418 BranchProbability SuccProb, BranchProbability HotProb);
431 const BlockChain &SuccChain, BranchProbability SuccProb,
432 BranchProbability RealSuccProb, const BlockChain &Chain,
477 BranchProbability QProb,
489 BranchProbability AdjustedSumProb, const BlockChain &Chain,
616 BranchProbability MachineBlockPlacement::collectViableSuccessors( in collectViableSuccessors()
636 auto AdjustedSumProb = BranchProbability::getOne(); in collectViableSuccessors()
662 static BranchProbability
663 getAdjustedProbability(BranchProbability OrigProb, in getAdjustedProbability()
[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()
DMachineBlockPlacement.cpp288 BranchProbability
295 BranchProbability SuccProb,
296 BranchProbability HotProb);
299 BlockChain &SuccChain, BranchProbability SuccProb,
300 BranchProbability RealSuccProb, BlockChain &Chain,
425 BranchProbability MachineBlockPlacement::collectViableSuccessors( in collectViableSuccessors()
444 auto AdjustedSumProb = BranchProbability::getOne(); in collectViableSuccessors()
470 static BranchProbability
471 getAdjustedProbability(BranchProbability OrigProb, in getAdjustedProbability()
472 BranchProbability AdjustedSumProb) { in getAdjustedProbability()
[all …]
/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/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/SelectionDAG/
DSelectionDAGBuilder.h168 BranchProbability Prob;
171 MachineBasicBlock *MBB, BranchProbability Prob) { in range()
183 BranchProbability Prob) { in jumpTable()
194 unsigned BTCasesIndex, BranchProbability Prob) { in bitTests()
212 BranchProbability ExtraProb;
216 BranchProbability Prob): in CaseBits()
248 BranchProbability TrueProb, FalseProb;
254 BranchProbability trueprob = BranchProbability::getUnknown(),
255 BranchProbability falseprob = BranchProbability::getUnknown())
294 BranchProbability ExtraProb;
[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-7.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;

123456