Lines Matching defs:CB
341 std::unique_ptr<InlineAdvice> MLInlineAdvisor::getAdviceImpl(CallBase &CB) {
342 if (auto Skip = getSkipAdviceIfUnreachableCallsite(CB))
345 auto &Caller = *CB.getCaller();
346 auto &Callee = *CB.getCalledFunction();
356 return std::make_unique<InlineAdvice>(this, CB, ORE,
357 GetDefaultAdvice(CB));
359 auto MandatoryKind = InlineAdvisor::getMandatoryKind(CB, FAM, ORE);
366 return getMandatoryAdvice(CB, false);
375 return OptimizationRemarkMissed(DEBUG_TYPE, "ForceStop", &CB)
378 return std::make_unique<InlineAdvice>(this, CB, ORE, Mandatory);
384 llvm::getInliningCostEstimate(CB, TIR, GetAssumptionCache);
389 return std::make_unique<InlineAdvice>(this, CB, ORE, false);
395 llvm::getInliningCostFeatures(CB, TIR, GetAssumptionCache);
397 return std::make_unique<InlineAdvice>(this, CB, ORE, false);
401 return getMandatoryAdvice(CB, true);
404 for (auto I = CB.arg_begin(), E = CB.arg_end(); I != E; ++I) {
446 GetDefaultAdvice(CB);
447 return getAdviceFromModel(CB, ORE);
451 MLInlineAdvisor::getAdviceFromModel(CallBase &CB,
454 this, CB, ORE, static_cast<bool>(ModelRunner->evaluate<int64_t>()));
458 MLInlineAdvisor::getSkipAdviceIfUnreachableCallsite(CallBase &CB) {
459 if (!FAM.getResult<DominatorTreeAnalysis>(*CB.getCaller())
460 .isReachableFromEntry(CB.getParent()))
461 return std::make_unique<InlineAdvice>(this, CB, getCallerORE(CB), false);
465 std::unique_ptr<InlineAdvice> MLInlineAdvisor::getMandatoryAdvice(CallBase &CB,
468 if (auto Skip = getSkipAdviceIfUnreachableCallsite(CB))
471 return getMandatoryAdviceImpl(CB);
477 return std::make_unique<InlineAdvice>(this, CB, getCallerORE(CB), Advice);
481 MLInlineAdvisor::getMandatoryAdviceImpl(CallBase &CB) {
482 return std::make_unique<MLInlineAdvice>(this, CB, getCallerORE(CB), true);
505 MLInlineAdvice::MLInlineAdvice(MLInlineAdvisor *Advisor, CallBase &CB,
508 : InlineAdvice(Advisor, CB, ORE, Recommendation),
517 FPU.emplace(Advisor->getCachedFPI(*getCaller()), CB);