Lines Matching refs:CB
345 const CallBase &CB, ArrayRef<InstrProfValueData> ValueDataRef,
351 bool tryToPromoteWithFuncCmp(CallBase &CB, Instruction *VPtr,
362 CallBase &CB, Instruction *VPtr, ArrayRef<PromotionCandidate> Candidates,
368 bool isProfitableToCompareVTables(const CallBase &CB,
379 Instruction *computeVTableInfos(const CallBase *CB,
386 void updateFuncValueProfiles(CallBase &CB, ArrayRef<InstrProfValueData> VDs,
414 const CallBase &CB, ArrayRef<InstrProfValueData> ValueDataRef, in getPromotionCandidatesForCallSite() argument
418 LLVM_DEBUG(dbgs() << " \nWork on callsite #" << NumOfPGOICallsites << CB in getPromotionCandidatesForCallSite()
435 if (ICPInvokeOnly && isa<CallInst>(CB)) { in getPromotionCandidatesForCallSite()
438 return OptimizationRemarkMissed(DEBUG_TYPE, "UserOptions", &CB) in getPromotionCandidatesForCallSite()
443 if (ICPCallOnly && isa<InvokeInst>(CB)) { in getPromotionCandidatesForCallSite()
446 return OptimizationRemarkMissed(DEBUG_TYPE, "UserOptions", &CB) in getPromotionCandidatesForCallSite()
454 return OptimizationRemarkMissed(DEBUG_TYPE, "CutOffReached", &CB) in getPromotionCandidatesForCallSite()
471 return OptimizationRemarkMissed(DEBUG_TYPE, "UnableToFindTarget", &CB) in getPromotionCandidatesForCallSite()
479 if (!isLegalToPromote(CB, TargetFunction, &Reason)) { in getPromotionCandidatesForCallSite()
483 return OptimizationRemarkMissed(DEBUG_TYPE, "UnableToPromote", &CB) in getPromotionCandidatesForCallSite()
507 const CallBase *CB, VTableGUIDCountsMap &GUIDCountsMap, in computeVTableInfos() argument
536 auto Iter = VirtualCSInfo.find(CB); in computeVTableInfos()
606 CallBase &llvm::pgo::promoteIndirectCall(CallBase &CB, Function *DirectCallee, in promoteIndirectCall() argument
611 CB, DirectCallee, in promoteIndirectCall()
612 createBranchWeights(CB.getContext(), Count, TotalCount - Count)); in promoteIndirectCall()
622 return OptimizationRemark(DEBUG_TYPE, "Promoted", &CB) in promoteIndirectCall()
632 CallBase &CB, Instruction *VPtr, ArrayRef<PromotionCandidate> Candidates, in tryToPromoteWithFuncCmp() argument
639 pgo::promoteIndirectCall(CB, C.TargetFunction, FuncCount, TotalCount, in tryToPromoteWithFuncCmp()
671 updateFuncValueProfiles(CB, ICallProfDataRef.slice(NumPromoted), TotalCount, in tryToPromoteWithFuncCmp()
678 CallBase &CB, ArrayRef<InstrProfValueData> CallVDs, uint64_t TotalCount, in updateFuncValueProfiles() argument
681 CB.setMetadata(LLVMContext::MD_prof, nullptr); in updateFuncValueProfiles()
684 annotateValueSite(M, CB, CallVDs, TotalCount, IPVK_IndirectCallTarget, in updateFuncValueProfiles()
713 CallBase &CB, Instruction *VPtr, ArrayRef<PromotionCandidate> Candidates, in tryToPromoteWithVTableCmp() argument
726 BasicBlock *OriginalBB = CB.getParent(); in tryToPromoteWithVTableCmp()
728 CB, VPtr, Candidate.TargetFunction, Candidate.AddressPoints, in tryToPromoteWithVTableCmp()
729 createBranchWeights(CB.getContext(), Candidate.Count, in tryToPromoteWithVTableCmp()
732 int SinkCount = tryToSinkInstructions(OriginalBB, CB.getParent()); in tryToPromoteWithVTableCmp()
735 OptimizationRemark Remark(DEBUG_TYPE, "Promoted", &CB); in tryToPromoteWithVTableCmp()
798 updateFuncValueProfiles(CB, VDs, TotalFuncCount, NumCandidates); in tryToPromoteWithVTableCmp()
808 for (auto *CB : findIndirectCalls(F)) { in processFunction() local
812 CB, TotalCount, NumCandidates); in processFunction()
818 *CB, ICallProfDataRef, TotalCount, NumCandidates); in processFunction()
822 computeVTableInfos(CB, VTableGUIDCounts, PromotionCandidates); in processFunction()
824 if (isProfitableToCompareVTables(*CB, PromotionCandidates, TotalCount)) in processFunction()
825 Changed |= tryToPromoteWithVTableCmp(*CB, VPtr, PromotionCandidates, in processFunction()
829 Changed |= tryToPromoteWithFuncCmp(*CB, VPtr, PromotionCandidates, in processFunction()
839 const CallBase &CB, ArrayRef<PromotionCandidate> Candidates, in isProfitableToCompareVTables() argument
844 << NumOfPGOICallsites << CB << "\n"); in isProfitableToCompareVTables()
948 CallBase &CB = DevirtCall.CB; in computeVirtualCallSiteTypeInfoMap() local
952 PGOIndirectCallVisitor::tryGetVTableInstruction(&CB); in computeVirtualCallSiteTypeInfoMap()
955 VirtualCSInfo[&CB] = {DevirtCall.Offset, VTablePtr, in computeVirtualCallSiteTypeInfoMap()