LLVM 24.0.0git
InlineAdvisor.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Macros

#define DEBUG_TYPE   "inline"

Functions

 STATISTIC (NumCallerCallersAnalyzed, "Number of caller-callers analyzed")
static std::optional< llvm::InlineCost > getDefaultInlineAdvice (CallBase &CB, FunctionAnalysisManager &FAM, const InlineParams &Params)
static bool shouldBeDeferred (Function *Caller, TargetTransformInfo &CalleeTTI, InlineCost IC, int &TotalSecondaryCost, function_ref< InlineCost(CallBase &CB)> GetInlineCost)
 Return true if inlining of CB can block the caller from being inlined which is proved to be more beneficial.
static raw_ostream & llvm::operator<< (raw_ostream &R, const ore::NV &Arg)
template<class RemarkT>
decltype(auto) llvm::operator<< (RemarkT &&R, const InlineCost &IC)
static const char * getLTOPhase (ThinOrFullLTOPhase LTOPhase)
static const char * getInlineAdvisorContext (InlinePass IP)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "inline"

Definition at line 35 of file InlineAdvisor.cpp.

Function Documentation

◆ getDefaultInlineAdvice()

◆ getInlineAdvisorContext()

◆ getLTOPhase()

◆ shouldBeDeferred()

bool shouldBeDeferred ( Function * Caller,
TargetTransformInfo & CalleeTTI,
InlineCost IC,
int & TotalSecondaryCost,
function_ref< InlineCost(CallBase &CB)> GetInlineCost )
static

Return true if inlining of CB can block the caller from being inlined which is proved to be more beneficial.

IC is the estimated inline cost associated with callsite CB. TotalSecondaryCost will be set to the estimated cost of inlining the caller if CB is suppressed for inlining.

Definition at line 255 of file InlineAdvisor.cpp.

References llvm::dyn_cast(), llvm::getAnalysisOptions(), llvm::CallBase::getCalledFunction(), llvm::InlineCost::getCost(), llvm::InlineCost::getCostDelta(), llvm::TargetTransformInfo::getInliningLastCallToStaticBonus(), and llvm::InlineCost::isAlways().

Referenced by llvm::shouldInline().

◆ STATISTIC()

STATISTIC ( NumCallerCallersAnalyzed ,
"Number of caller-callers analyzed"  )