/external/llvm/include/llvm/Analysis/ |
H A D | BranchProbabilityInfo.h | 138 DenseMap<Edge, uint32_t> Weights; member in class:llvm::BranchProbabilityInfo
|
H A D | BlockFrequencyInfoImpl.h | 350 WeightList Weights; ///< Individual successor weights. member in struct:llvm::BlockFrequencyInfoImplBase::Distribution 370 /// This is linear in the size of \a Weights. For the vast majority of
|
/external/llvm/lib/CodeGen/ |
H A D | StackProtector.cpp | 460 MDNode *Weights = MDBuilder(F->getContext()) local 462 B.CreateCondBr(Cmp, NewBB, FailBB, Weights);
|
/external/llvm/lib/IR/ |
H A D | MDBuilder.cpp | 42 MDNode *MDBuilder::createBranchWeights(ArrayRef<uint32_t> Weights) { argument 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/unittests/IR/ |
H A D | IRBuilderTest.cpp | 95 MDNode *Weights = MDBuilder(Ctx).createBranchWeights(42, 13); local 96 BI = Builder.CreateCondBr(Builder.getTrue(), TBB, FBB, Weights); 102 EXPECT_EQ(Weights, TI->getMetadata(LLVMContext::MD_prof));
|
/external/llvm/lib/Analysis/ |
H A D | BranchProbabilityInfo.cpp | 38 // Weights are for internal use only. They are used by heuristics to help to 205 SmallVector<uint32_t, 2> Weights; local 206 Weights.reserve(TI->getNumSuccessors()); 214 Weights.push_back(Weight->getZExtValue()); 215 WeightSum += Weights.back(); 217 assert(Weights.size() == TI->getNumSuccessors() && "Checked above"); 226 uint32_t W = Weights[i] / ScalingFactor; 297 // Calculate Edge Weights using "Pointer Heuristics". Predict a comparsion 330 // Calculate Edge Weights using "Loop Branch Heuristics". Predict backedges 519 Weights [all...] |
/external/clang/lib/CodeGen/ |
H A D | CodeGenPGO.cpp | 809 CodeGenFunction::createProfileWeights(ArrayRef<uint64_t> Weights) { argument 811 if (Weights.size() < 2) 815 uint64_t MaxWeight = *std::max_element(Weights.begin(), Weights.end()); 823 ScaledWeights.reserve(Weights.size()); 824 for (uint64_t W : Weights)
|
H A D | CGStmt.cpp | 1107 llvm::MDNode *Weights = nullptr; local 1111 Weights = createProfileWeights(ThisCount, DefaultCount); 1118 Builder.CreateCondBr(Cond, CaseDest, FalseDest, Weights);
|
H A D | CodeGenFunction.cpp | 1300 llvm::MDNode *Weights = local 1309 Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights, Unpredictable);
|
/external/llvm/lib/Transforms/Instrumentation/ |
H A D | PGOInstrumentation.cpp | 655 SmallVector<unsigned, 4> Weights; local 657 Weights.push_back(scaleBranchCount(ECI, Scale)); 660 MDB.createBranchWeights(Weights)); 662 for (const auto &W : Weights) { dbgs() << W << " "; }
|
/external/llvm/lib/Transforms/IPO/ |
H A D | SampleProfile.cpp | 1031 SmallVector<uint32_t, 4> Weights; local 1046 Weights.push_back(static_cast<uint32_t>(Weight)); 1060 MDB.createBranchWeights(Weights));
|
/external/llvm/lib/Transforms/Utils/ |
H A D | Local.cpp | 147 SmallVector<uint32_t, 8> Weights; local 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));
|
H A D | SimplifyCFG.cpp | 707 SmallVector<uint32_t, 8> Weights; local 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) { 819 Weights 813 GetBranchWeights(TerminatorInst *TI, SmallVectorImpl<uint64_t> &Weights) argument 834 FitWeights(MutableArrayRef<uint64_t> Weights) argument 876 SmallVector<uint64_t, 8> Weights; local 2971 SmallVector<uint64_t, 8> Weights; local 3106 SmallVector<uint64_t, 8> Weights; local 3619 SmallVector<uint64_t, 8> Weights; local 3703 SmallVector<uint64_t, 8> Weights; local [all...] |
/external/llvm/lib/Transforms/Scalar/ |
H A D | JumpThreading.cpp | 1651 SmallVector<uint32_t, 4> Weights; local 1653 Weights.push_back(static_cast<uint32_t>(Freq)); 1656 for (int I = 0, E = Weights.size(); I < E; I++) 1657 BPI->setEdgeWeight(BB, I, Weights[I]); 1659 if (Weights.size() >= 2) { 1663 MDBuilder(TI->getParent()->getContext()).createBranchWeights(Weights));
|
/external/llvm/include/llvm/IR/ |
H A D | IRBuilder.h | 604 InstTy *addBranchMetadata(InstTy *I, MDNode *Weights, MDNode *Unpredictable) { argument 605 if (Weights) 606 I->setMetadata(LLVMContext::MD_prof, Weights);
|