Lines Matching refs:CB
136 const CallBase &CB, const ArrayRef<InstrProfValueData> &ValueDataRef,
141 uint32_t tryToPromote(CallBase &CB,
161 const CallBase &CB, const ArrayRef<InstrProfValueData> &ValueDataRef,
165 LLVM_DEBUG(dbgs() << " \nWork on callsite #" << NumOfPGOICallsites << CB
182 if (ICPInvokeOnly && isa<CallInst>(CB)) {
185 return OptimizationRemarkMissed(DEBUG_TYPE, "UserOptions", &CB)
190 if (ICPCallOnly && isa<InvokeInst>(CB)) {
193 return OptimizationRemarkMissed(DEBUG_TYPE, "UserOptions", &CB)
201 return OptimizationRemarkMissed(DEBUG_TYPE, "CutOffReached", &CB)
218 return OptimizationRemarkMissed(DEBUG_TYPE, "UnableToFindTarget", &CB)
226 if (!isLegalToPromote(CB, TargetFunction, &Reason)) {
230 return OptimizationRemarkMissed(DEBUG_TYPE, "UnableToPromote", &CB)
244 CallBase &llvm::pgo::promoteIndirectCall(CallBase &CB, Function *DirectCallee,
252 MDBuilder MDB(CB.getContext());
257 promoteCallWithIfThenElse(CB, DirectCallee, BranchWeights);
270 return OptimizationRemark(DEBUG_TYPE, "Promoted", &CB)
280 CallBase &CB, const std::vector<PromotionCandidate> &Candidates,
286 pgo::promoteIndirectCall(CB, C.TargetFunction, Count, TotalCount, SamplePGO,
301 for (auto *CB : findIndirectCalls(F)) {
305 CB, NumVals, TotalCount, NumCandidates);
310 *CB, ICallProfDataRef, TotalCount, NumCandidates);
311 uint32_t NumPromoted = tryToPromote(*CB, PromotionCandidates, TotalCount);
317 CB->setMetadata(LLVMContext::MD_prof, nullptr);
322 annotateValueSite(*M, *CB, ICallProfDataRef.slice(NumPromoted), TotalCount,