Lines Matching refs:IC
205 const ReplayInlinerSettings &ReplaySettings, InlineContext IC) { in tryCreate() argument
209 Advisor.reset(DA.Factory(M, FAM, Params, IC)); in tryCreate()
219 Advisor.reset(new DefaultInlineAdvisor(M, FAM, Params, IC)); in tryCreate()
225 /* EmitRemarks =*/true, IC); in tryCreate()
249 shouldBeDeferred(Function *Caller, InlineCost IC, int &TotalSecondaryCost, in shouldBeDeferred() argument
257 if (IC.getCost() <= 0) in shouldBeDeferred()
277 int CandidateCost = IC.getCost() - 1; in shouldBeDeferred()
327 return TotalSecondaryCost < IC.getCost(); in shouldBeDeferred()
329 int TotalCost = TotalSecondaryCost + IC.getCost() * NumCallerUsers; in shouldBeDeferred()
330 int Allowance = IC.getCost() * InlineDeferralScale; in shouldBeDeferred()
340 RemarkT &operator<<(RemarkT &&R, const InlineCost &IC) { in operator <<() argument
342 if (IC.isAlways()) { in operator <<()
344 } else if (IC.isNever()) { in operator <<()
347 R << "(cost=" << ore::NV("Cost", IC.getCost()) in operator <<()
348 << ", threshold=" << ore::NV("Threshold", IC.getThreshold()) << ")"; in operator <<()
350 if (const char *Reason = IC.getReason()) in operator <<()
356 std::string llvm::inlineCostStr(const InlineCost &IC) { in inlineCostStr() argument
359 Remark << IC; in inlineCostStr()
381 InlineCost IC = GetInlineCost(CB); in shouldInline() local
386 if (IC.isAlways()) { in shouldInline()
387 LLVM_DEBUG(dbgs() << " Inlining " << inlineCostStr(IC) in shouldInline()
389 return IC; in shouldInline()
392 if (!IC) { in shouldInline()
393 LLVM_DEBUG(dbgs() << " NOT Inlining " << inlineCostStr(IC) in shouldInline()
395 if (IC.isNever()) { in shouldInline()
400 << "' because it should never be inlined " << IC; in shouldInline()
407 << IC; in shouldInline()
410 setInlineRemark(CB, inlineCostStr(IC)); in shouldInline()
416 shouldBeDeferred(Caller, IC, TotalSecondaryCost, GetInlineCost)) { in shouldInline()
418 << " Cost = " << IC.getCost() in shouldInline()
431 LLVM_DEBUG(dbgs() << " Inlining " << inlineCostStr(IC) << ", Call: " << CB in shouldInline()
433 return IC; in shouldInline()
510 const Function &Callee, const Function &Caller, const InlineCost &IC, in emitInlinedIntoBasedOnCost() argument
513 ORE, DLoc, Block, Callee, Caller, IC.isAlways(), in emitInlinedIntoBasedOnCost()
517 Remark << " with " << IC; in emitInlinedIntoBasedOnCost()
523 std::optional<InlineContext> IC) in InlineAdvisor() argument
524 : M(M), FAM(FAM), IC(IC), in InlineAdvisor()
525 AnnotatedInlinePassName((IC && AnnotateInlinePhase) in InlineAdvisor()
526 ? llvm::AnnotateInlinePassName(*IC) in InlineAdvisor()
586 std::string llvm::AnnotateInlinePassName(InlineContext IC) { in AnnotateInlinePassName() argument
587 return std::string(getLTOPhase(IC.LTOPhase)) + "-" + in AnnotateInlinePassName()
588 std::string(getInlineAdvisorContext(IC.Pass)); in AnnotateInlinePassName()