/external/llvm/include/llvm/IR/ |
MDBuilder.h | 57 /// \brief Return metadata containing two branch weights. 59 uint32_t Weights[] = { TrueWeight, FalseWeight }; 60 return createBranchWeights(Weights); 63 /// \brief Return metadata containing a number of branch weights. 64 MDNode *createBranchWeights(ArrayRef<uint32_t> Weights) { 65 assert(Weights.size() >= 2 && "Need at least two branch weights!"); 67 SmallVector<Value *, 4> Vals(Weights.size()+1); 71 for (unsigned i = 0, e = Weights.size(); i != e; ++i) 72 Vals[i+1] = ConstantInt::get(Int32Ty, Weights[i]) [all...] |
IRBuilder.h | 449 InstTy *addBranchWeights(InstTy *I, MDNode *Weights) { 450 if (Weights) 451 I->setMetadata(LLVMContext::MD_prof, Weights); [all...] |
/external/llvm/lib/Analysis/ |
ProfileDataLoaderPass.cpp | 131 /// edge into branch weights for each conditional branch (a branch with 2 or 147 // Load the weights of all edges leading from this terminator. 150 SmallVector<uint32_t, 4> Weights(NumSuccessors); 153 Weights[s] = (uint32_t)PB.getEdgeWeight(edge); 155 << Weights[s] << "\n"); 164 MDNode *Node = MDB.createBranchWeights(Weights);
|
BranchProbabilityInfo.cpp | 35 // Weights are for internal use only. They are used by heuristics to help to 38 // Using "Loop Branch Heuristics" we predict weights of edges for the 106 /// \brief Calculate edge weights for successors lead to unreachable. 171 // Ensure there are weights for all of the successors. Note that the first 176 // Build up the final weights that will be used in a temporary buffer, but 180 SmallVector<uint32_t, 2> Weights; 181 Weights.reserve(TI->getNumSuccessors()); 186 Weights.push_back( 189 assert(Weights.size() == TI->getNumSuccessors() && "Checked above"); 191 setEdgeWeight(BB, i, Weights[i]) [all...] |
/external/llvm/lib/Transforms/Utils/ |
LowerExpectIntrinsic.cpp | 76 std::vector<uint32_t> Weights(n + 1); 78 Weights[0] = Case == SI->case_default() ? LikelyBranchWeight 81 Weights[i + 1] = i == Case.getCaseIndex() ? LikelyBranchWeight 85 MDBuilder(CI->getContext()).createBranchWeights(Weights));
|
SimplifyCFG.cpp | 677 // Collect branch weights into a vector. 678 SmallVector<uint32_t, 8> Weights; 686 Weights.push_back(CI->getValue().getZExtValue()); 692 std::swap(Weights[i.getCaseIndex()+1], Weights.back()); 693 Weights.pop_back(); 699 if (HasWeight && Weights.size() >= 2) 702 createBranchWeights(Weights)); 781 /// Get Weights of a given TerminatorInst, the default weight is at the front 785 SmallVectorImpl<uint64_t> &Weights) { [all...] |
Local.cpp | 130 // Collect branch weights into a vector. 131 SmallVector<uint32_t, 8> Weights; 136 Weights.push_back(CI->getValue().getZExtValue()); 140 Weights[0] += Weights[idx+1]; 142 std::swap(Weights[idx+1], Weights.back()); 143 Weights.pop_back(); 146 createBranchWeights(Weights)); [all...] |
/external/llvm/lib/CodeGen/ |
MachineBasicBlock.cpp | 321 if (!Weights.empty()) 448 // list, so we fill all Weights with 0's. 449 if (weight != 0 && Weights.empty()) 450 Weights.resize(Successors.size()); 452 if (weight != 0 || !Weights.empty()) 453 Weights.push_back(weight); 465 if (!Weights.empty()) { 467 Weights.erase(WI); 478 if (!Weights.empty()) { 480 Weights.erase(WI) [all...] |
/external/llvm/include/llvm/Analysis/ |
BranchProbabilityInfo.h | 97 /// This returns the sum of all raw edge weights from Src to Dst. 106 /// weights are calculated carefully before using! 118 // weight to an edge that may have siblings with non-zero weights. This can 123 DenseMap<Edge, uint32_t> Weights; 134 /// \brief Get sum of the block successors' weights.
|
/external/llvm/unittests/IR/ |
IRBuilderTest.cpp | 92 MDNode *Weights = MDBuilder(getGlobalContext()).createBranchWeights(42, 13); 93 BI = Builder.CreateCondBr(Builder.getTrue(), TBB, FBB, Weights); 99 EXPECT_EQ(Weights, TI->getMetadata(LLVMContext::MD_prof));
|
/external/llvm/ |
README.android | 49 * 981d826 - getSuccWeight returns now default 0 if Weights vector is empty. (13 days ago) <Jakub Staszak>
|
/external/openfst/src/include/fst/ |
accumulator.h | 19 // Classes to accumulate arc weights. Useful for weight lookahead. 40 // This class accumulates arc weights using the semiring Plus(). 77 // This class accumulates arc weights using the log semiring Plus() 79 // and from log64 weights. 135 vector<double> *Weights() { return &weights_; } 148 // weights_. Position -1 means no pre-computed weights for that 157 // This class accumulates arc weights using the log semiring Plus() 159 // from log64 weights. The member function Init(fst) has to be called 188 vector<double> &weights = *data_->Weights(); local 386 vector<double>* weights; \/\/ Accumulated weights for this state. member in struct:fst::CacheLogAccumulatorData::CacheState [all...] |
/external/llvm/include/llvm/CodeGen/ |
MachineBasicBlock.h | 75 /// Weights - Keep track of the weights to the successors. This vector 78 std::vector<uint32_t> Weights; 351 /// parameter is stored in Weights list and it may be used by
|