Lines Matching refs:CB

70   MandatoryInlineAdvice(InlineAdvisor *Advisor, CallBase &CB,  in MandatoryInlineAdvice()  argument
73 : InlineAdvice(Advisor, CB, ORE, IsInliningMandatory) {} in MandatoryInlineAdvice()
132 CallBase &CB, FunctionAnalysisManager &FAM, const InlineParams &Params) { in getDefaultInlineAdvice() argument
133 Function &Caller = *CB.getCaller(); in getDefaultInlineAdvice()
137 *CB.getParent()->getParent()->getParent()); in getDefaultInlineAdvice()
150 auto GetInlineCost = [&](CallBase &CB) { in getDefaultInlineAdvice() argument
151 Function &Callee = *CB.getCalledFunction(); in getDefaultInlineAdvice()
156 return getInlineCost(CB, Params, CalleeTTI, GetAssumptionCache, GetTLI, in getDefaultInlineAdvice()
160 CB, GetInlineCost, ORE, in getDefaultInlineAdvice()
165 DefaultInlineAdvisor::getAdviceImpl(CallBase &CB) { in getAdviceImpl() argument
166 auto OIC = getDefaultInlineAdvice(CB, FAM, Params); in getAdviceImpl()
168 this, CB, OIC, in getAdviceImpl()
169 FAM.getResult<OptimizationRemarkEmitterAnalysis>(*CB.getCaller())); in getAdviceImpl()
172 InlineAdvice::InlineAdvice(InlineAdvisor *Advisor, CallBase &CB, in InlineAdvice() argument
175 : Advisor(Advisor), Caller(CB.getCaller()), Callee(CB.getCalledFunction()), in InlineAdvice()
176 DLoc(CB.getDebugLoc()), Block(CB.getParent()), ORE(ORE), in InlineAdvice()
218 llvm::getDevelopmentModeAdvisor(M, MAM, [&FAM, Params](CallBase &CB) { in tryCreate() argument
219 auto OIC = getDefaultInlineAdvice(CB, FAM, Params); in tryCreate()
242 function_ref<InlineCost(CallBase &CB)> GetInlineCost) { in shouldBeDeferred()
355 void llvm::setInlineRemark(CallBase &CB, StringRef Message) { in setInlineRemark() argument
359 Attribute Attr = Attribute::get(CB.getContext(), "inline-remark", Message); in setInlineRemark()
360 CB.addFnAttr(Attr); in setInlineRemark()
368 llvm::shouldInline(CallBase &CB, in shouldInline() argument
369 function_ref<InlineCost(CallBase &CB)> GetInlineCost, in shouldInline()
373 InlineCost IC = GetInlineCost(CB); in shouldInline()
374 Instruction *Call = &CB; in shouldInline()
375 Function *Callee = CB.getCalledFunction(); in shouldInline()
376 Function *Caller = CB.getCaller(); in shouldInline()
380 << ", Call: " << CB << "\n"); in shouldInline()
386 << ", Call: " << CB << "\n"); in shouldInline()
402 setInlineRemark(CB, inlineCostStr(IC)); in shouldInline()
409 LLVM_DEBUG(dbgs() << " NOT Inlining: " << CB in shouldInline()
419 setInlineRemark(CB, "deferred"); in shouldInline()
423 LLVM_DEBUG(dbgs() << " Inlining " << inlineCostStr(IC) << ", Call: " << CB in shouldInline()
535 std::unique_ptr<InlineAdvice> InlineAdvisor::getMandatoryAdvice(CallBase &CB, in getMandatoryAdvice() argument
537 return std::make_unique<MandatoryInlineAdvice>(this, CB, getCallerORE(CB), in getMandatoryAdvice()
584 InlineAdvisor::getMandatoryKind(CallBase &CB, FunctionAnalysisManager &FAM, in getMandatoryKind() argument
586 auto &Callee = *CB.getCalledFunction(); in getMandatoryKind()
595 llvm::getAttributeBasedInliningDecision(CB, &Callee, TIR, GetTLI); in getMandatoryKind()
606 std::unique_ptr<InlineAdvice> InlineAdvisor::getAdvice(CallBase &CB, in getAdvice() argument
609 return getAdviceImpl(CB); in getAdvice()
610 bool Advice = CB.getCaller() != CB.getCalledFunction() && in getAdvice()
612 getMandatoryKind(CB, FAM, getCallerORE(CB)); in getAdvice()
613 return getMandatoryAdvice(CB, Advice); in getAdvice()
616 OptimizationRemarkEmitter &InlineAdvisor::getCallerORE(CallBase &CB) { in getCallerORE() argument
617 return FAM.getResult<OptimizationRemarkEmitterAnalysis>(*CB.getCaller()); in getCallerORE()