LLVM: lib/Analysis/InlineAdvisor.cpp File Reference (original) (raw)

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
decltype(auto) llvm::operator<< (RemarkT &&R, const InlineCost &IC)
static const char * getLTOPhase (ThinOrFullLTOPhase LTOPhase)
static const char * getInlineAdvisorContext (InlinePass IP)
Variables
static cl::opt< bool > InlineRemarkAttribute ("inline-remark-attribute", cl::init(false), cl::Hidden, cl::desc("Enable adding inline-remark attribute to" " callsites processed by inliner but decided" " to be not inlined"))
Flag to add inline messages as callsite attributes 'inline-remark'.
static cl::opt< bool > EnableInlineDeferral ("inline-deferral", cl::init(false), cl::Hidden, cl::desc("Enable deferred inlining"))
static cl::opt< int > InlineDeferralScale ("inline-deferral-scale", cl::desc("Scale to limit the cost of inline deferral"), cl::init(2), cl::Hidden)
static cl::opt< bool > AnnotateInlinePhase ("annotate-inline-phase", cl::Hidden, cl::init(false), cl::desc("If true, annotate inline advisor remarks " "with LTO and pass information."))
static cl::opt< std::string > IR2VecVocabFile ("ml-inliner-ir2vec-vocab-file", cl::Hidden, cl::desc("Vocab file for IR2Vec; Setting this enables " "configuring the model to use IR2Vec embeddings."))

DEBUG_TYPE

#define DEBUG_TYPE "inline"

getDefaultInlineAdvice()

Definition at line 144 of file InlineAdvisor.cpp.

References DEBUG_TYPE, llvm::InlineParams::EnableDeferral, EnableInlineDeferral, F, FAM, llvm::CallBase::getCalledFunction(), llvm::CallBase::getCaller(), llvm::getInlineCost(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), and llvm::shouldInline().

Referenced by llvm::InlineAdvisorAnalysis::Result::tryCreate().

getInlineAdvisorContext()

getLTOPhase()

shouldBeDeferred()

STATISTIC()

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

AnnotateInlinePhase

cl::opt< bool > AnnotateInlinePhase("annotate-inline-phase", cl::Hidden, cl::init(false), cl::desc("If true, annotate inline advisor remarks " "with LTO and pass information.")) ( "annotate-inline-phase" , cl::Hidden , cl::init(false) , cl::desc("If true, annotate inline advisor remarks " "with LTO and pass information.") ) static

EnableInlineDeferral

cl::opt< bool > EnableInlineDeferral("inline-deferral", cl::init(false), cl::Hidden, cl::desc("Enable deferred inlining")) ( "inline-deferral" , cl::init(false) , cl::Hidden , cl::desc("Enable deferred inlining") ) static

InlineDeferralScale

cl::opt< int > InlineDeferralScale("inline-deferral-scale", cl::desc("Scale to limit the cost of inline deferral"), cl::init(2), cl::Hidden) ( "inline-deferral-scale" , cl::desc("Scale to limit the cost of inline deferral") , cl::init(2) , cl::Hidden ) static

InlineRemarkAttribute

cl::opt< bool > InlineRemarkAttribute("inline-remark-attribute", cl::init(false), cl::Hidden, cl::desc("Enable adding inline-remark attribute to" " callsites processed by inliner but decided" " to be not inlined")) ( "inline-remark-attribute" , cl::init(false) , cl::Hidden , cl::desc("Enable adding inline-remark attribute to" " callsites processed by inliner but decided" " to be not inlined") ) static

IR2VecVocabFile

cl::opt< std::string > IR2VecVocabFile("ml-inliner-ir2vec-vocab-file", cl::Hidden, cl::desc("Vocab file for IR2Vec; Setting this enables " "configuring the model to use IR2Vec embeddings.")) ( "ml-inliner-ir2vec-vocab-file" , cl::Hidden , cl::desc("Vocab file for IR2Vec; Setting this enables " "configuring the model to use IR2Vec embeddings.") ) static