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