LLVM 20.0.0git
|
The default (manual heuristics) implementation of the InlineAdvisor. More...
#include "llvm/Analysis/InlineAdvisor.h"
Public Member Functions | |
DefaultInlineAdvisor (Module &M, FunctionAnalysisManager &FAM, InlineParams Params, InlineContext IC) | |
Public Member Functions inherited from llvm::InlineAdvisor | |
InlineAdvisor (InlineAdvisor &&)=delete | |
virtual | ~InlineAdvisor () |
std::unique_ptr< InlineAdvice > | getAdvice (CallBase &CB, bool MandatoryOnly=false) |
Get an InlineAdvice containing a recommendation on whether to inline or not. | |
virtual void | onPassEntry (LazyCallGraph::SCC *SCC=nullptr) |
This must be called when the Inliner pass is entered, to allow the InlineAdvisor update internal state, as result of function passes run between Inliner pass runs (for the same module). | |
virtual void | onPassExit (LazyCallGraph::SCC *SCC=nullptr) |
This must be called when the Inliner pass is exited, as function passes may be run subsequently. | |
virtual void | print (raw_ostream &OS) const |
Support for printer pass. | |
const char * | getAnnotatedInlinePassName () const |
NOTE pass name is annotated only when inline advisor constructor provides InlineContext. | |
Additional Inherited Members | |
Protected Types inherited from llvm::InlineAdvisor | |
enum class | MandatoryInliningKind { NotMandatory , Always , Never } |
Protected Member Functions inherited from llvm::InlineAdvisor | |
InlineAdvisor (Module &M, FunctionAnalysisManager &FAM, std::optional< InlineContext > IC=std::nullopt) | |
virtual std::unique_ptr< InlineAdvice > | getAdviceImpl (CallBase &CB)=0 |
virtual std::unique_ptr< InlineAdvice > | getMandatoryAdvice (CallBase &CB, bool Advice) |
OptimizationRemarkEmitter & | getCallerORE (CallBase &CB) |
Static Protected Member Functions inherited from llvm::InlineAdvisor | |
static MandatoryInliningKind | getMandatoryKind (CallBase &CB, FunctionAnalysisManager &FAM, OptimizationRemarkEmitter &ORE) |
Protected Attributes inherited from llvm::InlineAdvisor | |
Module & | M |
FunctionAnalysisManager & | FAM |
const std::optional< InlineContext > | IC |
const std::string | AnnotatedInlinePassName |
std::unique_ptr< ImportedFunctionsInliningStatistics > | ImportedFunctionsStats |
The default (manual heuristics) implementation of the InlineAdvisor.
This implementation does not need to keep state between inliner pass runs, and is reusable as-is for inliner pass test scenarios, as well as for regular use.
Definition at line 229 of file InlineAdvisor.h.
|
inline |
Definition at line 231 of file InlineAdvisor.h.