/freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/ |
H A D | MisExpect.h | 28 /// \param Weights A vector of profile weights for each target block 31 const llvm::SmallVector<uint32_t, 4> &Weights,
|
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | MisExpect.cpp | 96 void verifyMisExpect(Instruction *I, const SmallVector<uint32_t, 4> &Weights, argument 106 LLVM_DEBUG(for (int Idx = 0, Size = Weights.size(); Idx < Size; ++Idx) { 107 llvm::dbgs() << "Weights[" << Idx << "] = " << Weights[Idx] << "\n"; 124 const uint64_t ProfileCount = Weights[Index]; 126 Weights.begin(), Weights.end(), (uint64_t)0, std::plus<uint64_t>()); 127 const uint64_t NumUnlikelyTargets = Weights.size() - 1;
|
H A D | SimplifyCFG.cpp | 789 static void setBranchWeights(SwitchInst *SI, ArrayRef<uint32_t> Weights) { argument 793 if (llvm::any_of(Weights, [](uint32_t W) { return W != 0; })) 794 N = MDBuilder(SI->getParent()->getContext()).createBranchWeights(Weights); 966 /// Get Weights of a given terminator, the default weight is at the front 970 SmallVectorImpl<uint64_t> &Weights) { 975 Weights.push_back(CI->getValue().getZExtValue()); 982 assert(Weights.size() == 2); 985 std::swap(Weights.front(), Weights.back()); 990 static void FitWeights(MutableArrayRef<uint64_t> Weights) { argument 969 GetBranchWeights(Instruction *TI, SmallVectorImpl<uint64_t> &Weights) argument 1040 SmallVector<uint64_t, 8> Weights; local 3593 SmallVector<uint64_t, 8> Weights; local 4466 SmallVector<uint64_t, 8> Weights; local [all...] |
H A D | Local.cpp | 189 SmallVector<uint32_t, 8> Weights; local 193 Weights.push_back(CI->getValue().getZExtValue()); 197 Weights[0] += Weights[idx+1]; 199 std::swap(Weights[idx+1], Weights.back()); 200 Weights.pop_back(); 203 createBranchWeights(Weights));
|
H A D | CodeExtractor.cpp | 1372 for (unsigned I = 0, E = BranchDist.Weights.size(); I < E; ++I) { 1373 const auto &Weight = BranchDist.Weights[I];
|
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Analysis/ |
H A D | BlockFrequencyInfoImpl.cpp | 137 Weights.push_back(Weight(Type, Node, Amount)); 156 static void combineWeightsBySorting(WeightList &Weights) { 158 llvm::sort(Weights, [](const Weight &L, const Weight &R) { 163 WeightList::iterator O = Weights.begin(); 164 for (WeightList::const_iterator I = O, L = O, E = Weights.end(); I != E; 174 Weights.erase(O, Weights.end()); 177 static void combineWeightsByHashing(WeightList &Weights) { 181 HashTable Combined(NextPowerOf2(2 * Weights.size())); 182 for (const Weight &W : Weights) [all...] |
H A D | BranchProbabilityInfo.cpp | 75 // Weights are for internal use only. They are used by heuristics to help to 299 SmallVector<uint32_t, 2> Weights; local 302 Weights.reserve(TI->getNumSuccessors()); 310 Weights.push_back(Weight->getZExtValue()); 311 WeightSum += Weights.back(); 317 assert(Weights.size() == TI->getNumSuccessors() && "Checked above"); 327 Weights[i] /= ScalingFactor; 328 WeightSum += Weights[i]; 336 Weights[i] = 1; 343 BP.push_back({ Weights[ [all...] |
/freebsd-11-stable/contrib/llvm-project/compiler-rt/lib/fuzzer/ |
H A D | FuzzerCorpus.h | 275 Weights.resize(N); 278 Weights[i] = Inputs[i]->NumFeatures 286 Printf("%f ", Weights[i]); 287 Printf("Weights\n"); 290 Intervals.begin(), Intervals.end(), Weights.begin()); 295 Vector<double> Weights;
|
H A D | FuzzerDataFlowTrace.cpp | 192 auto Weights = Coverage.FunctionWeights(NumFunctions); 196 Intervals.begin(), Intervals.end(), Weights.begin()); 203 if (!Weights[i]) continue; 205 Weights[i], Coverage.GetNumberOfBlocks(i),
|
/freebsd-11-stable/contrib/llvm-project/llvm/lib/IR/ |
H A D | MDBuilder.cpp | 42 MDNode *MDBuilder::createBranchWeights(ArrayRef<uint32_t> Weights) { argument 43 assert(Weights.size() >= 1 && "Need at least one 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]));
|
H A D | Instructions.cpp | 3895 if (!Weights) 3898 assert(SI.getNumSuccessors() == Weights->size() && 3902 all_of(Weights.getValue(), [](uint32_t W) { return W == 0; }); 3904 if (AllZeroes || Weights.getValue().size() < 2) 3907 return MDBuilder(SI.getParent()->getContext()).createBranchWeights(*Weights); 3920 SmallVector<uint32_t, 8> Weights; local 3924 Weights.push_back(CW); 3926 this->Weights = std::move(Weights); 3931 if (Weights) { [all...] |
H A D | Instruction.cpp | 751 SmallVector<uint32_t, 1> Weights; local 752 Weights.push_back(W); 754 setMetadata(LLVMContext::MD_prof, MDB.createBranchWeights(Weights));
|
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/Scalar/ |
H A D | LowerExpectIntrinsic.cpp | 74 SmallVector<uint32_t, 16> Weights(n + 1, UnlikelyBranchWeight); 77 Weights[Index] = LikelyBranchWeight; 88 MDBuilder(CI->getContext()).createBranchWeights(Weights));
|
H A D | JumpThreading.cpp | 282 SmallVector<uint32_t, 2> Weights; local 284 Weights.push_back(BP.getNumerator()); 285 Weights.push_back(BP.getCompl().getNumerator()); 287 Weights.push_back(BP.getCompl().getNumerator()); 288 Weights.push_back(BP.getNumerator()); 292 .createBranchWeights(Weights)); 2287 SmallVector<uint32_t, 4> Weights; local 2289 Weights.push_back(Prob.getNumerator()); 2294 MDBuilder(TI->getParent()->getContext()).createBranchWeights(Weights));
|
/freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/IR/ |
H A D | MDBuilder.h | 64 MDNode *createBranchWeights(ArrayRef<uint32_t> Weights);
|
/freebsd-11-stable/contrib/llvm-project/clang/lib/CodeGen/ |
H A D | CodeGenPGO.cpp | 1027 CodeGenFunction::createProfileWeights(ArrayRef<uint64_t> Weights) { argument 1029 if (Weights.size() < 2) 1033 uint64_t MaxWeight = *std::max_element(Weights.begin(), Weights.end()); 1041 ScaledWeights.reserve(Weights.size()); 1042 for (uint64_t W : Weights)
|
H A D | CGDeclCXX.cpp | 311 llvm::MDNode *Weights; local 317 Weights = nullptr; 330 Weights = MDHelper.createBranchWeights(1, NumInits - 1); 333 Builder.CreateCondBr(NeedsInit, InitBlock, NoInitBlock, Weights);
|
H A D | CGStmt.cpp | 1239 llvm::MDNode *Weights = nullptr; local 1243 Weights = createProfileWeights(ThisCount, DefaultCount); 1250 Builder.CreateCondBr(Cond, CaseDest, FalseDest, Weights);
|
H A D | CodeGenFunction.cpp | 1653 llvm::MDNode *Weights = local 1662 Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights, Unpredictable);
|
/freebsd-11-stable/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | StackProtector.cpp | 514 MDNode *Weights = MDBuilder(F->getContext()) local 517 B.CreateCondBr(Cmp, NewBB, FailBB, Weights);
|
H A D | SafeStack.cpp | 471 MDNode *Weights = MDBuilder(F.getContext()) local 476 /* Unreachable */ true, Weights);
|
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/ |
H A D | PGOInstrumentation.cpp | 1703 SmallVector<unsigned, 4> Weights; local 1705 Weights.push_back(scaleBranchCount(ECI, Scale)); 1708 : Weights) { 1712 misexpect::verifyMisExpect(TI, Weights, TI->getContext()); 1714 TI->setMetadata(LLVMContext::MD_prof, MDB.createBranchWeights(Weights)); 1721 std::accumulate(Weights.begin(), Weights.end(), (uint64_t)0, 1727 BranchProbability BP(scaleBranchCount(Weights[0], Scale),
|
H A D | ControlHeightReduction.cpp | 1877 SmallVector<uint32_t, 2> Weights; local 1878 Weights.push_back(static_cast<uint32_t>(CHRBranchBias.scale(1000))); 1879 Weights.push_back(static_cast<uint32_t>(CHRBranchBias.getCompl().scale(1000))); 1881 MergedBR->setMetadata(LLVMContext::MD_prof, MDB.createBranchWeights(Weights)); 1882 CHR_DEBUG(dbgs() << "CHR branch bias " << Weights[0] << ":" << Weights[1] local
|
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/IPO/ |
H A D | SampleProfile.cpp | 1376 // If a block Weights 0, all its in/out edges should weight 0. 1568 SmallVector<uint32_t, 4> Weights; local 1585 Weights.push_back(static_cast<uint32_t>(Weight + 1)); 1594 misexpect::verifyMisExpect(TI, Weights, TI->getContext()); 1605 MDB.createBranchWeights(Weights));
|
/freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/Analysis/ |
H A D | BlockFrequencyInfoImpl.h | 378 WeightList Weights; ///< Individual successor weights. 401 /// This is linear in the size of \a Weights. For the vast majority of
|