Lines Matching defs:Count
324 const uint64_t Count;
336 PromotionCandidate(Function *F, uint64_t C) : TargetFunction(F), Count(C) {}
428 uint64_t Count = ValueDataRef[I].Count;
429 assert(Count <= TotalCount);
432 LLVM_DEBUG(dbgs() << " Candidate " << I << " Count=" << Count
486 << NV("Count", Count) << ": " << Reason;
491 Ret.push_back(PromotionCandidate(TargetFunction, Count));
492 TotalCount -= Count;
560 GUIDCountsMap[VTableVal] = V.Count;
588 Candidate.VTableGUIDAndCounts[VTableVal] = V.Count;
607 uint64_t Count, uint64_t TotalCount,
612 createBranchWeights(CB.getContext(), Count, TotalCount - Count));
615 setBranchWeights(NewInst, {static_cast<uint32_t>(Count)},
624 << " with count " << NV("Count", Count) << " out of "
638 uint64_t FuncCount = C.Count;
696 for (auto [GUID, Count] : VTableGUIDCounts) {
697 if (Count == 0)
700 VTableValueProfiles.push_back({GUID, Count});
701 TotalVTableCount += Count;
705 return LHS.Count > RHS.Count;
720 for (auto &[GUID, Count] : Candidate.VTableGUIDAndCounts)
721 VTableGUIDCounts[GUID] -= Count;
729 createBranchWeights(CB.getContext(), Candidate.Count,
730 TotalFuncCount - Candidate.Count));
740 << " with count " << ore::NV("Count", Candidate.Count)
749 for (auto [GUID, Count] : VTableGUIDAndCounts)
762 PromotedFuncCount.push_back(Candidate.Count);
764 assert(TotalFuncCount >= Candidate.Count &&
770 TotalFuncCount -= std::min(TotalFuncCount, Candidate.Count);
784 ICallProfDataRef[I].Count -=
785 std::max(PromotedFuncCount[I], ICallProfDataRef[I].Count);
789 return LHS.Count > RHS.Count;
795 [](uint64_t Count, const InstrProfValueData &ProfData) {
796 return ProfData.Count <= Count;
852 << Candidate.Count << ", VTableCounts:");
853 // Add [[maybe_unused]] since <GUID, Count> are only used by LLVM_DEBUG.
854 for ([[maybe_unused]] auto &[GUID, Count] : VTableGUIDAndCounts)
856 << ", " << Count << "}");
860 for (auto &[GUID, Count] : VTableGUIDAndCounts)
861 CandidateVTableCount += Count;
863 if (CandidateVTableCount < Candidate.Count * ICPVTablePercentageThreshold) {
865 dbgs() << " function count " << Candidate.Count
871 RemainingVTableCount -= Candidate.Count;