Lines Matching refs:CB

74   MandatoryInlineAdvice(InlineAdvisor *Advisor, CallBase &CB,  in MandatoryInlineAdvice()  argument
77 : InlineAdvice(Advisor, CB, ORE, IsInliningMandatory) {} in MandatoryInlineAdvice()
136 CallBase &CB, FunctionAnalysisManager &FAM, const InlineParams &Params) { in getDefaultInlineAdvice() argument
137 Function &Caller = *CB.getCaller(); in getDefaultInlineAdvice()
141 *CB.getParent()->getParent()->getParent()); in getDefaultInlineAdvice()
154 auto GetInlineCost = [&](CallBase &CB) { in getDefaultInlineAdvice() argument
155 Function &Callee = *CB.getCalledFunction(); in getDefaultInlineAdvice()
160 return getInlineCost(CB, Params, CalleeTTI, GetAssumptionCache, GetTLI, in getDefaultInlineAdvice()
164 CB, GetInlineCost, ORE, in getDefaultInlineAdvice()
169 DefaultInlineAdvisor::getAdviceImpl(CallBase &CB) { in getAdviceImpl() argument
170 auto OIC = getDefaultInlineAdvice(CB, FAM, Params); in getAdviceImpl()
172 this, CB, OIC, in getAdviceImpl()
173 FAM.getResult<OptimizationRemarkEmitterAnalysis>(*CB.getCaller())); in getAdviceImpl()
176 InlineAdvice::InlineAdvice(InlineAdvisor *Advisor, CallBase &CB, in InlineAdvice() argument
179 : Advisor(Advisor), Caller(CB.getCaller()), Callee(CB.getCalledFunction()), in InlineAdvice()
180 DLoc(CB.getDebugLoc()), Block(CB.getParent()), ORE(ORE), in InlineAdvice()
213 auto GetDefaultAdvice = [&FAM, Params](CallBase &CB) { in tryCreate() argument
214 auto OIC = getDefaultInlineAdvice(CB, FAM, Params); in tryCreate()
251 function_ref<InlineCost(CallBase &CB)> GetInlineCost) { in shouldBeDeferred()
364 void llvm::setInlineRemark(CallBase &CB, StringRef Message) { in setInlineRemark() argument
368 Attribute Attr = Attribute::get(CB.getContext(), "inline-remark", Message); in setInlineRemark()
369 CB.addFnAttr(Attr); in setInlineRemark()
377 llvm::shouldInline(CallBase &CB, in shouldInline() argument
378 function_ref<InlineCost(CallBase &CB)> GetInlineCost, in shouldInline()
382 InlineCost IC = GetInlineCost(CB); in shouldInline()
383 Instruction *Call = &CB; in shouldInline()
384 Function *Callee = CB.getCalledFunction(); in shouldInline()
385 Function *Caller = CB.getCaller(); in shouldInline()
389 << ", Call: " << CB << "\n"); in shouldInline()
395 << ", Call: " << CB << "\n"); in shouldInline()
411 setInlineRemark(CB, inlineCostStr(IC)); in shouldInline()
418 LLVM_DEBUG(dbgs() << " NOT Inlining: " << CB in shouldInline()
428 setInlineRemark(CB, "deferred"); in shouldInline()
432 LLVM_DEBUG(dbgs() << " Inlining " << inlineCostStr(IC) << ", Call: " << CB in shouldInline()
544 std::unique_ptr<InlineAdvice> InlineAdvisor::getMandatoryAdvice(CallBase &CB, in getMandatoryAdvice() argument
546 return std::make_unique<MandatoryInlineAdvice>(this, CB, getCallerORE(CB), in getMandatoryAdvice()
593 InlineAdvisor::getMandatoryKind(CallBase &CB, FunctionAnalysisManager &FAM, in getMandatoryKind() argument
595 auto &Callee = *CB.getCalledFunction(); in getMandatoryKind()
604 llvm::getAttributeBasedInliningDecision(CB, &Callee, TIR, GetTLI); in getMandatoryKind()
615 std::unique_ptr<InlineAdvice> InlineAdvisor::getAdvice(CallBase &CB, in getAdvice() argument
618 return getAdviceImpl(CB); in getAdvice()
619 bool Advice = CB.getCaller() != CB.getCalledFunction() && in getAdvice()
621 getMandatoryKind(CB, FAM, getCallerORE(CB)); in getAdvice()
622 return getMandatoryAdvice(CB, Advice); in getAdvice()
625 OptimizationRemarkEmitter &InlineAdvisor::getCallerORE(CallBase &CB) { in getCallerORE() argument
626 return FAM.getResult<OptimizationRemarkEmitterAnalysis>(*CB.getCaller()); in getCallerORE()