/external/llvm/lib/Analysis/ |
BlockFrequencyInfoImpl.cpp | 62 /// 1. Initialize by saving the sum of the weights in \a RemWeight and the 115 Weights.push_back(Weight(Type, Node, Amount)); 133 static void combineWeightsBySorting(WeightList &Weights) { 135 std::sort(Weights.begin(), Weights.end(), 140 WeightList::iterator O = Weights.begin(); 141 for (WeightList::const_iterator I = O, L = O, E = Weights.end(); I != E; 145 // Find the adjacent weights to the same node. 151 Weights.erase(O, Weights.end()) [all...] |
BranchProbabilityInfo.cpp | 38 // Weights are for internal use only. They are used by heuristics to help to 41 // Using "Loop Branch Heuristics" we predict weights of edges for the 118 /// \brief Calculate edge weights for successors lead to unreachable. 155 // Return false here so that edge weights for InvokeInst could be decided 196 // Ensure there are weights for all of the successors. Note that the first 201 // Build up the final weights that will be used in a temporary buffer. 202 // Compute the sum of all weights to later decide whether they need to 205 SmallVector<uint32_t, 2> Weights; 206 Weights.reserve(TI->getNumSuccessors()); 214 Weights.push_back(Weight->getZExtValue()) [all...] |
/external/llvm/lib/Transforms/Scalar/ |
LowerExpectIntrinsic.cpp | 60 SmallVector<uint32_t, 16> Weights(n + 1, UnlikelyBranchWeight); 63 Weights[0] = LikelyBranchWeight; 65 Weights[Case.getCaseIndex() + 1] = LikelyBranchWeight; 68 MDBuilder(CI->getContext()).createBranchWeights(Weights));
|
JumpThreading.cpp | 197 // When profile data is available, we need to update edge weights after [all...] |
/external/llvm/lib/IR/ |
MDBuilder.cpp | 42 MDNode *MDBuilder::createBranchWeights(ArrayRef<uint32_t> Weights) { 43 assert(Weights.size() >= 2 && "Need at least two branch weights!"); 45 SmallVector<Metadata *, 4> Vals(Weights.size() + 1); 49 for (unsigned i = 0, e = Weights.size(); i != e; ++i) 50 Vals[i + 1] = createConstant(ConstantInt::get(Int32Ty, Weights[i]));
|
/external/llvm/lib/Transforms/Utils/ |
SimplifyCFG.cpp | 706 // Collect branch weights into a vector. 707 SmallVector<uint32_t, 8> Weights; 714 Weights.push_back(CI->getValue().getZExtValue()); 720 std::swap(Weights[i.getCaseIndex()+1], Weights.back()); 721 Weights.pop_back(); 727 if (HasWeight && Weights.size() >= 2) 730 createBranchWeights(Weights)); 810 /// Get Weights of a given TerminatorInst, the default weight is at the front 814 SmallVectorImpl<uint64_t> &Weights) [all...] |
Local.cpp | 146 // Collect branch weights into a vector. 147 SmallVector<uint32_t, 8> Weights; 153 Weights.push_back(CI->getValue().getZExtValue()); 157 Weights[0] += Weights[idx+1]; 159 std::swap(Weights[idx+1], Weights.back()); 160 Weights.pop_back(); 163 createBranchWeights(Weights)); [all...] |
/external/llvm/include/llvm/IR/ |
MDBuilder.h | 57 /// \brief Return metadata containing two branch weights. 60 /// \brief Return metadata containing a number of branch weights. 61 MDNode *createBranchWeights(ArrayRef<uint32_t> Weights);
|
IRBuilder.h | 604 InstTy *addBranchMetadata(InstTy *I, MDNode *Weights, MDNode *Unpredictable) { 605 if (Weights) 606 I->setMetadata(LLVMContext::MD_prof, Weights); [all...] |
/external/llvm/include/llvm/Analysis/ |
BranchProbabilityInfo.h | 98 /// This returns the sum of all raw edge weights from Src to Dst. 110 /// weights are calculated carefully before using! 133 // weight to an edge that may have siblings with non-zero weights. This can 138 DenseMap<Edge, uint32_t> Weights; 149 /// \brief Get sum of the block successors' weights.
|
BlockFrequencyInfoImpl.h | 203 ExitMap Exits; ///< Successor edges (and weights). 344 /// This class collates the successor edge weights for later processing. 350 WeightList Weights; ///< Individual successor weights. 351 uint64_t Total; ///< Sum of all weights. 370 /// This is linear in the size of \a Weights. For the vast majority of 371 /// cases, adjacent edge weights are combined by sorting WeightList and 372 /// combining adjacent weights. However, for very large edge lists an 451 /// This adjusts header mass distribution so it matches the weights of 715 /// - Normalize the distribution: scale weights down so that their su [all...] |
/external/llvm/lib/Transforms/Instrumentation/ |
PGOInstrumentation.cpp | 30 // annotates the branch weights. 454 // Set the branch weights based on the count values. 625 DEBUG(dbgs() << "\nSetting branch weights.\n"); 655 SmallVector<unsigned, 4> Weights; 657 Weights.push_back(scaleBranchCount(ECI, Scale)); 660 MDB.createBranchWeights(Weights)); 662 for (const auto &W : Weights) { dbgs() << W << " "; }
|
/external/llvm/lib/CodeGen/ |
StackProtector.cpp | 460 MDNode *Weights = MDBuilder(F->getContext()) 462 B.CreateCondBr(Cmp, NewBB, FailBB, Weights);
|
/external/clang/lib/CodeGen/ |
CodeGenPGO.cpp | 770 /// \brief Calculate what to divide by to scale weights. 773 /// weights to strictly less than UINT32_MAX. 796 // Check for empty weights. 809 CodeGenFunction::createProfileWeights(ArrayRef<uint64_t> Weights) { 810 // We need at least two elements to create meaningful weights. 811 if (Weights.size() < 2) 814 // Check for empty weights. 815 uint64_t MaxWeight = *std::max_element(Weights.begin(), Weights.end()); 823 ScaledWeights.reserve(Weights.size()) [all...] |
CGStmt.cpp | [all...] |
CodeGenFunction.cpp | [all...] |
CodeGenFunction.h | [all...] |
/external/llvm/unittests/IR/ |
IRBuilderTest.cpp | 95 MDNode *Weights = MDBuilder(Ctx).createBranchWeights(42, 13); 96 BI = Builder.CreateCondBr(Builder.getTrue(), TBB, FBB, Weights); 102 EXPECT_EQ(Weights, TI->getMetadata(LLVMContext::MD_prof));
|
/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/include/ |
dxva.h | 196 SHORT Weights[2][32][3][2];
|
/external/llvm/lib/Transforms/IPO/ |
SampleProfile.cpp | 17 // - prof: Represents branch weights. This annotation is added to branches 18 // to indicate the weights of each edge coming out of the branch. 66 "sample block/edge weights through the CFG.")); 153 /// \brief Map basic blocks to their computed weights. 156 /// of all the instruction weights in that block. 159 /// \brief Map edges to their computed weights. 161 /// Edge weights are computed by propagating basic block weights in 171 /// \brief Equivalence classes for block weights. 378 /// Clear all the per-function data used to load samples and propagate weights [all...] |