Lines Matching full:cb
54 DefaultInlineAdvice(DefaultInlineAdvisor *Advisor, CallBase &CB, in DefaultInlineAdvice() argument
56 : InlineAdvice(Advisor, CB, ORE, OIC.hasValue()), OriginalCB(&CB), in DefaultInlineAdvice()
88 CallBase &CB, FunctionAnalysisManager &FAM, const InlineParams &Params) { in getDefaultInlineAdvice() argument
89 Function &Caller = *CB.getCaller(); in getDefaultInlineAdvice()
93 *CB.getParent()->getParent()->getParent()); in getDefaultInlineAdvice()
106 auto GetInlineCost = [&](CallBase &CB) { in getDefaultInlineAdvice() argument
107 Function &Callee = *CB.getCalledFunction(); in getDefaultInlineAdvice()
112 return getInlineCost(CB, Params, CalleeTTI, GetAssumptionCache, GetTLI, in getDefaultInlineAdvice()
115 return llvm::shouldInline(CB, GetInlineCost, ORE, in getDefaultInlineAdvice()
120 std::unique_ptr<InlineAdvice> DefaultInlineAdvisor::getAdvice(CallBase &CB) { in getAdvice() argument
121 auto OIC = getDefaultInlineAdvice(CB, FAM, Params); in getAdvice()
123 this, CB, OIC, in getAdvice()
124 FAM.getResult<OptimizationRemarkEmitterAnalysis>(*CB.getCaller())); in getAdvice()
127 InlineAdvice::InlineAdvice(InlineAdvisor *Advisor, CallBase &CB, in InlineAdvice() argument
130 : Advisor(Advisor), Caller(CB.getCaller()), Callee(CB.getCalledFunction()), in InlineAdvice()
131 DLoc(CB.getDebugLoc()), Block(CB.getParent()), ORE(ORE), in InlineAdvice()
167 llvm::getDevelopmentModeAdvisor(M, MAM, [&FAM, Params](CallBase &CB) { in tryCreate() argument
168 auto OIC = getDefaultInlineAdvice(CB, FAM, Params); in tryCreate()
182 /// Return true if inlining of CB can block the caller from being
184 /// estimated inline cost associated with callsite \p CB.
186 /// caller if \p CB is suppressed for inlining.
189 function_ref<InlineCost(CallBase &CB)> GetInlineCost) { in shouldBeDeferred()
193 // If the cost of inlining CB is non-positive, it is not going to prevent the in shouldBeDeferred()
302 void llvm::setInlineRemark(CallBase &CB, StringRef Message) { in setInlineRemark() argument
306 Attribute Attr = Attribute::get(CB.getContext(), "inline-remark", Message); in setInlineRemark()
307 CB.addAttribute(AttributeList::FunctionIndex, Attr); in setInlineRemark()
315 llvm::shouldInline(CallBase &CB, in shouldInline() argument
316 function_ref<InlineCost(CallBase &CB)> GetInlineCost, in shouldInline()
320 InlineCost IC = GetInlineCost(CB); in shouldInline()
321 Instruction *Call = &CB; in shouldInline()
322 Function *Callee = CB.getCalledFunction(); in shouldInline()
323 Function *Caller = CB.getCaller(); in shouldInline()
327 << ", Call: " << CB << "\n"); in shouldInline()
333 << ", Call: " << CB << "\n"); in shouldInline()
349 setInlineRemark(CB, inlineCostStr(IC)); in shouldInline()
356 LLVM_DEBUG(dbgs() << " NOT Inlining: " << CB in shouldInline()
366 setInlineRemark(CB, "deferred"); in shouldInline()
372 LLVM_DEBUG(dbgs() << " Inlining " << inlineCostStr(IC) << ", Call: " << CB in shouldInline()
444 std::unique_ptr<InlineAdvice> MandatoryInlineAdvisor::getAdvice(CallBase &CB) { in getAdvice() argument
445 auto &Caller = *CB.getCaller(); in getAdvice()
446 auto &Callee = *CB.getCalledFunction(); in getAdvice()
450 MandatoryInlineAdvisor::getMandatoryKind(CB, FAM, ORE) && in getAdvice()
452 return std::make_unique<InlineAdvice>(this, CB, ORE, Advice); in getAdvice()
456 MandatoryInlineAdvisor::getMandatoryKind(CallBase &CB, in getMandatoryKind() argument
459 auto &Callee = *CB.getCalledFunction(); in getMandatoryKind()
468 llvm::getAttributeBasedInliningDecision(CB, &Callee, TIR, GetTLI); in getMandatoryKind()