Home
last modified time | relevance | path

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

12

/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DBlockFrequencyInfoImpl.cpp137 Weights.push_back(Weight(Type, Node, Amount)); in add()
156 static void combineWeightsBySorting(WeightList &Weights) { in combineWeightsBySorting() argument
158 llvm::sort(Weights, [](const Weight &L, const Weight &R) { in combineWeightsBySorting()
163 WeightList::iterator O = Weights.begin(); in combineWeightsBySorting()
164 for (WeightList::const_iterator I = O, L = O, E = Weights.end(); I != E; in combineWeightsBySorting()
174 Weights.erase(O, Weights.end()); in combineWeightsBySorting()
177 static void combineWeightsByHashing(WeightList &Weights) { in combineWeightsByHashing() argument
181 HashTable Combined(NextPowerOf2(2 * Weights.size())); in combineWeightsByHashing()
182 for (const Weight &W : Weights) in combineWeightsByHashing()
186 if (Weights.size() == Combined.size()) in combineWeightsByHashing()
[all …]
DBranchProbabilityInfo.cpp299 SmallVector<uint32_t, 2> Weights; in calcMetadataWeights() local
302 Weights.reserve(TI->getNumSuccessors()); in calcMetadataWeights()
310 Weights.push_back(Weight->getZExtValue()); in calcMetadataWeights()
311 WeightSum += Weights.back(); in calcMetadataWeights()
317 assert(Weights.size() == TI->getNumSuccessors() && "Checked above"); in calcMetadataWeights()
327 Weights[i] /= ScalingFactor; in calcMetadataWeights()
328 WeightSum += Weights[i]; in calcMetadataWeights()
336 Weights[i] = 1; in calcMetadataWeights()
343 BP.push_back({ Weights[i], static_cast<uint32_t>(WeightSum) }); in calcMetadataWeights()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/
DMisExpect.cpp96 void verifyMisExpect(Instruction *I, const SmallVector<uint32_t, 4> &Weights, in verifyMisExpect() argument
106 LLVM_DEBUG(for (int Idx = 0, Size = Weights.size(); Idx < Size; ++Idx) { in verifyMisExpect()
107 llvm::dbgs() << "Weights[" << Idx << "] = " << Weights[Idx] << "\n"; in verifyMisExpect()
124 const uint64_t ProfileCount = Weights[Index]; in verifyMisExpect()
126 Weights.begin(), Weights.end(), (uint64_t)0, std::plus<uint64_t>()); in verifyMisExpect()
127 const uint64_t NumUnlikelyTargets = Weights.size() - 1; in verifyMisExpect()
DSimplifyCFG.cpp789 static void setBranchWeights(SwitchInst *SI, ArrayRef<uint32_t> Weights) { in setBranchWeights() argument
793 if (llvm::any_of(Weights, [](uint32_t W) { return W != 0; })) in setBranchWeights()
794 N = MDBuilder(SI->getParent()->getContext()).createBranchWeights(Weights); in setBranchWeights()
970 SmallVectorImpl<uint64_t> &Weights) { in GetBranchWeights() argument
975 Weights.push_back(CI->getValue().getZExtValue()); in GetBranchWeights()
982 assert(Weights.size() == 2); in GetBranchWeights()
985 std::swap(Weights.front(), Weights.back()); in GetBranchWeights()
990 static void FitWeights(MutableArrayRef<uint64_t> Weights) { in FitWeights() argument
991 uint64_t Max = *std::max_element(Weights.begin(), Weights.end()); in FitWeights()
994 for (uint64_t &I : Weights) in FitWeights()
[all …]
DLocal.cpp189 SmallVector<uint32_t, 8> Weights; in ConstantFoldTerminator() local
193 Weights.push_back(CI->getValue().getZExtValue()); in ConstantFoldTerminator()
197 Weights[0] += Weights[idx+1]; in ConstantFoldTerminator()
199 std::swap(Weights[idx+1], Weights.back()); in ConstantFoldTerminator()
200 Weights.pop_back(); in ConstantFoldTerminator()
203 createBranchWeights(Weights)); in ConstantFoldTerminator()
DCodeExtractor.cpp1372 for (unsigned I = 0, E = BranchDist.Weights.size(); I < E; ++I) { in calculateNewCallTerminatorWeights()
1373 const auto &Weight = BranchDist.Weights[I]; in calculateNewCallTerminatorWeights()
/third_party/json/tests/thirdparty/Fuzzer/
DFuzzerCorpus.h190 Weights.resize(N); in UpdateCorpusDistribution()
194 Weights[i] = Inputs[i]->NumFeatures * (i + 1); in UpdateCorpusDistribution()
196 std::iota(Weights.begin(), Weights.end(), 1); in UpdateCorpusDistribution()
198 Intervals.begin(), Intervals.end(), Weights.begin()); in UpdateCorpusDistribution()
203 std::vector<double> Weights; variable
/third_party/skia/third_party/externals/swiftshader/third_party/subzero/src/
DIceRegAlloc.cpp88 const llvm::SmallVector<RegWeight, LinearScan::REGS_SIZE> &Weights) { in findMinWeightIndex() argument
91 if (MinWeightIndex < 0 || Weights[i] < Weights[MinWeightIndex]) in findMinWeightIndex()
606 Iter.Weights[RegAlias].setWeight(RegWeight::Inf); in filterFreeWithPrecoloredRanges()
674 Iter.Weights[RegAlias].addWeight(W); in handleNoFreeRegisters()
685 Iter.Weights[RegAlias].addWeight(W); in handleNoFreeRegisters()
690 int32_t MinWeightIndex = findMinWeightIndex(Iter.RegMask, Iter.Weights); in handleNoFreeRegisters()
693 Iter.Cur->getWeight(Func) <= Iter.Weights[MinWeightIndex]) { in handleNoFreeRegisters()
720 MinWeightIndex = findMinWeightIndex(Iter.RegMaskUnfiltered, Iter.Weights); in handleNoFreeRegisters()
722 if (Iter.Cur->getWeight(Func) <= Iter.Weights[MinWeightIndex]) { in handleNoFreeRegisters()
845 Iter.Weights.reserve(NumRegisters); in scan()
[all …]
DIceRegAlloc.h71 llvm::SmallVector<RegWeight, REGS_SIZE> Weights; variable
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/IR/
DMDBuilder.cpp42 MDNode *MDBuilder::createBranchWeights(ArrayRef<uint32_t> Weights) { in createBranchWeights() argument
43 assert(Weights.size() >= 1 && "Need at least one branch weights!"); in createBranchWeights()
45 SmallVector<Metadata *, 4> Vals(Weights.size() + 1); in createBranchWeights()
49 for (unsigned i = 0, e = Weights.size(); i != e; ++i) in createBranchWeights()
50 Vals[i + 1] = createConstant(ConstantInt::get(Int32Ty, Weights[i])); in createBranchWeights()
DInstructions.cpp3895 if (!Weights) in buildProfBranchWeightsMD()
3898 assert(SI.getNumSuccessors() == Weights->size() && in buildProfBranchWeightsMD()
3902 all_of(Weights.getValue(), [](uint32_t W) { return W == 0; }); in buildProfBranchWeightsMD()
3904 if (AllZeroes || Weights.getValue().size() < 2) in buildProfBranchWeightsMD()
3907 return MDBuilder(SI.getParent()->getContext()).createBranchWeights(*Weights); in buildProfBranchWeightsMD()
3920 SmallVector<uint32_t, 8> Weights; in init() local
3924 Weights.push_back(CW); in init()
3926 this->Weights = std::move(Weights); in init()
3931 if (Weights) { in removeCase()
3932 assert(SI.getNumSuccessors() == Weights->size() && in removeCase()
[all …]
DInstruction.cpp751 SmallVector<uint32_t, 1> Weights; in setProfWeight() local
752 Weights.push_back(W); in setProfWeight()
754 setMetadata(LLVMContext::MD_prof, MDB.createBranchWeights(Weights)); in setProfWeight()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
DLowerExpectIntrinsic.cpp74 SmallVector<uint32_t, 16> Weights(n + 1, UnlikelyBranchWeight); in handleSwitchExpect() local
77 Weights[Index] = LikelyBranchWeight; in handleSwitchExpect()
88 MDBuilder(CI->getContext()).createBranchWeights(Weights)); in handleSwitchExpect()
DJumpThreading.cpp282 SmallVector<uint32_t, 2> Weights; in updatePredecessorProfileMetadata() local
284 Weights.push_back(BP.getNumerator()); in updatePredecessorProfileMetadata()
285 Weights.push_back(BP.getCompl().getNumerator()); in updatePredecessorProfileMetadata()
287 Weights.push_back(BP.getCompl().getNumerator()); in updatePredecessorProfileMetadata()
288 Weights.push_back(BP.getNumerator()); in updatePredecessorProfileMetadata()
292 .createBranchWeights(Weights)); in updatePredecessorProfileMetadata()
2287 SmallVector<uint32_t, 4> Weights; in UpdateBlockFreqAndEdgeWeight() local
2289 Weights.push_back(Prob.getNumerator()); in UpdateBlockFreqAndEdgeWeight()
2294 MDBuilder(TI->getParent()->getContext()).createBranchWeights(Weights)); in UpdateBlockFreqAndEdgeWeight()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Transforms/Utils/
DMisExpect.h31 const llvm::SmallVector<uint32_t, 4> &Weights,
/third_party/ffmpeg/libavcodec/
Ddxva2_h264.c273 slice->Weights[list][i][plane][0] = w; in fill_slice_long()
274 slice->Weights[list][i][plane][1] = o; in fill_slice_long()
280 slice->Weights[list][i][plane][0] = 0; in fill_slice_long()
281 slice->Weights[list][i][plane][1] = 0; in fill_slice_long()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Instrumentation/
DPGOInstrumentation.cpp1703 SmallVector<unsigned, 4> Weights; in setProfMetadata() local
1705 Weights.push_back(scaleBranchCount(ECI, Scale)); in setProfMetadata()
1708 : Weights) { in setProfMetadata()
1712 misexpect::verifyMisExpect(TI, Weights, TI->getContext()); in setProfMetadata()
1714 TI->setMetadata(LLVMContext::MD_prof, MDB.createBranchWeights(Weights)); in setProfMetadata()
1721 std::accumulate(Weights.begin(), Weights.end(), (uint64_t)0, in setProfMetadata()
1727 BranchProbability BP(scaleBranchCount(Weights[0], Scale), in setProfMetadata()
DControlHeightReduction.cpp1877 SmallVector<uint32_t, 2> Weights; in fixupBranchesAndSelects() local
1878 Weights.push_back(static_cast<uint32_t>(CHRBranchBias.scale(1000))); in fixupBranchesAndSelects()
1879 Weights.push_back(static_cast<uint32_t>(CHRBranchBias.getCompl().scale(1000))); in fixupBranchesAndSelects()
1881 MergedBR->setMetadata(LLVMContext::MD_prof, MDB.createBranchWeights(Weights)); in fixupBranchesAndSelects()
1882 CHR_DEBUG(dbgs() << "CHR branch bias " << Weights[0] << ":" << Weights[1] in fixupBranchesAndSelects()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/
DStackProtector.cpp514 MDNode *Weights = MDBuilder(F->getContext()) in InsertStackProtectors() local
517 B.CreateCondBr(Cmp, NewBB, FailBB, Weights); in InsertStackProtectors()
DSafeStack.cpp471 MDNode *Weights = MDBuilder(F.getContext()) in checkStackGuard() local
476 /* Unreachable */ true, Weights); in checkStackGuard()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/IR/
DMDBuilder.h64 MDNode *createBranchWeights(ArrayRef<uint32_t> Weights);
DIRBuilder.h937 InstTy *addBranchMetadata(InstTy *I, MDNode *Weights, MDNode *Unpredictable) { in addBranchMetadata() argument
938 if (Weights) in addBranchMetadata()
939 I->setMetadata(LLVMContext::MD_prof, Weights); in addBranchMetadata()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/IPO/
DSampleProfile.cpp1568 SmallVector<uint32_t, 4> Weights; in propagateWeights() local
1585 Weights.push_back(static_cast<uint32_t>(Weight + 1)); in propagateWeights()
1594 misexpect::verifyMisExpect(TI, Weights, TI->getContext()); in propagateWeights()
1605 MDB.createBranchWeights(Weights)); in propagateWeights()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Analysis/
DBlockFrequencyInfoImpl.h378 WeightList Weights; ///< Individual successor weights. member
/third_party/skia/third_party/externals/opengl-registry/extensions/ARB/
DARB_vertex_blend.txt222 how a texture image is mapped onto a primitive. Weights are

12