Home
last modified time | relevance | path

Searched refs:Weights (Results 1 – 13 of 13) sorted by relevance

/external/llvm/include/llvm/IR/
DMDBuilder.h59 uint32_t Weights[] = { TrueWeight, FalseWeight }; in createBranchWeights() local
60 return createBranchWeights(Weights); in createBranchWeights()
64 MDNode *createBranchWeights(ArrayRef<uint32_t> Weights) { in createBranchWeights() argument
65 assert(Weights.size() >= 2 && "Need at least two branch weights!"); in createBranchWeights()
67 SmallVector<Value *, 4> Vals(Weights.size()+1); in createBranchWeights()
71 for (unsigned i = 0, e = Weights.size(); i != e; ++i) in createBranchWeights()
72 Vals[i+1] = ConstantInt::get(Int32Ty, Weights[i]); in createBranchWeights()
DIRBuilder.h452 InstTy *addBranchWeights(InstTy *I, MDNode *Weights) { in addBranchWeights() argument
453 if (Weights) in addBranchWeights()
454 I->setMetadata(LLVMContext::MD_prof, Weights); in addBranchWeights()
/external/llvm/lib/CodeGen/
DMachineBasicBlock.cpp326 if (!Weights.empty()) in print()
486 if (weight != 0 && Weights.empty()) in addSuccessor()
487 Weights.resize(Successors.size()); in addSuccessor()
489 if (weight != 0 || !Weights.empty()) in addSuccessor()
490 Weights.push_back(weight); in addSuccessor()
502 if (!Weights.empty()) { in removeSuccessor()
504 Weights.erase(WI); in removeSuccessor()
515 if (!Weights.empty()) { in removeSuccessor()
517 Weights.erase(WI); in removeSuccessor()
556 if (!Weights.empty()) { in replaceSuccessor()
[all …]
/external/llvm/lib/Transforms/Utils/
DSimplifyCFG.cpp618 SmallVector<uint32_t, 8> Weights; in SimplifyEqualityComparisonWithOnlyPredecessor() local
626 Weights.push_back(CI->getValue().getZExtValue()); in SimplifyEqualityComparisonWithOnlyPredecessor()
632 std::swap(Weights[i.getCaseIndex()+1], Weights.back()); in SimplifyEqualityComparisonWithOnlyPredecessor()
633 Weights.pop_back(); in SimplifyEqualityComparisonWithOnlyPredecessor()
639 if (HasWeight && Weights.size() >= 2) in SimplifyEqualityComparisonWithOnlyPredecessor()
642 createBranchWeights(Weights)); in SimplifyEqualityComparisonWithOnlyPredecessor()
725 SmallVectorImpl<uint64_t> &Weights) { in GetBranchWeights() argument
731 Weights.push_back(CI->getValue().getZExtValue()); in GetBranchWeights()
738 assert(Weights.size() == 2); in GetBranchWeights()
741 std::swap(Weights.front(), Weights.back()); in GetBranchWeights()
[all …]
DLowerExpectIntrinsic.cpp76 std::vector<uint32_t> Weights(n + 1); in HandleSwitchExpect() local
78 Weights[0] = Case == SI->case_default() ? LikelyBranchWeight in HandleSwitchExpect()
81 Weights[i + 1] = i == Case.getCaseIndex() ? LikelyBranchWeight in HandleSwitchExpect()
85 MDBuilder(CI->getContext()).createBranchWeights(Weights)); in HandleSwitchExpect()
DLocal.cpp131 SmallVector<uint32_t, 8> Weights; in ConstantFoldTerminator() local
136 Weights.push_back(CI->getValue().getZExtValue()); in ConstantFoldTerminator()
140 Weights[0] += Weights[idx+1]; in ConstantFoldTerminator()
142 std::swap(Weights[idx+1], Weights.back()); in ConstantFoldTerminator()
143 Weights.pop_back(); in ConstantFoldTerminator()
146 createBranchWeights(Weights)); in ConstantFoldTerminator()
/external/llvm/lib/Analysis/
DBranchProbabilityInfo.cpp194 SmallVector<uint32_t, 2> Weights; in calcMetadataWeights() local
195 Weights.reserve(TI->getNumSuccessors()); in calcMetadataWeights()
200 Weights.push_back( in calcMetadataWeights()
203 assert(Weights.size() == TI->getNumSuccessors() && "Checked above"); in calcMetadataWeights()
205 setEdgeWeight(BB, i, Weights[i]); in calcMetadataWeights()
572 Weights.find(std::make_pair(Src, IndexInSuccessors)); in getEdgeWeight()
574 if (I != Weights.end()) in getEdgeWeight()
588 MapI = Weights.find(std::make_pair(Src, I.getSuccessorIndex())); in getEdgeWeight()
589 if (MapI != Weights.end()) in getEdgeWeight()
600 Weights[std::make_pair(Src, IndexInSuccessors)] = Weight; in setEdgeWeight()
DProfileDataLoaderPass.cpp150 SmallVector<uint32_t, 4> Weights(NumSuccessors); in setBranchWeightMetadata() local
153 Weights[s] = (uint32_t)PB.getEdgeWeight(edge); in setBranchWeightMetadata()
155 << Weights[s] << "\n"); in setBranchWeightMetadata()
164 MDNode *Node = MDB.createBranchWeights(Weights); in setBranchWeightMetadata()
/external/llvm/unittests/IR/
DIRBuilderTest.cpp92 MDNode *Weights = MDBuilder(getGlobalContext()).createBranchWeights(42, 13); in TEST_F() local
93 BI = Builder.CreateCondBr(Builder.getTrue(), TBB, FBB, Weights); in TEST_F()
99 EXPECT_EQ(Weights, TI->getMetadata(LLVMContext::MD_prof)); in TEST_F()
/external/llvm/include/llvm/Analysis/
DBranchProbabilityInfo.h123 DenseMap<Edge, uint32_t> Weights; variable
/external/openfst/src/include/fst/
Daccumulator.h135 vector<double> *Weights() { return &weights_; } in Weights() function
188 vector<double> &weights = *data_->Weights(); in SetState()
248 vector<double> &weights = *data_->Weights();
/external/llvm/
DREADME.android53 …* 981d826 - getSuccWeight returns now default 0 if Weights vector is empty. (13 days ago) <Jakub S…
/external/llvm/include/llvm/CodeGen/
DMachineBasicBlock.h77 std::vector<uint32_t> Weights;