LLVM 19.0.0git
Public Member Functions | List of all members
llvm::DefaultInlineAdvisor Class Reference

The default (manual heuristics) implementation of the InlineAdvisor. More...

#include "llvm/Analysis/InlineAdvisor.h"

Inheritance diagram for llvm::DefaultInlineAdvisor:
Inheritance graph
[legend]

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< InlineAdvicegetAdvice (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 chargetAnnotatedInlinePassName () 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< InlineAdvicegetAdviceImpl (CallBase &CB)=0
 
virtual std::unique_ptr< InlineAdvicegetMandatoryAdvice (CallBase &CB, bool Advice)
 
OptimizationRemarkEmittergetCallerORE (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
ModuleM
 
FunctionAnalysisManagerFAM
 
const std::optional< InlineContextIC
 
const std::string AnnotatedInlinePassName
 
std::unique_ptr< ImportedFunctionsInliningStatisticsImportedFunctionsStats
 

Detailed Description

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 230 of file InlineAdvisor.h.

Constructor & Destructor Documentation

◆ DefaultInlineAdvisor()

llvm::DefaultInlineAdvisor::DefaultInlineAdvisor ( Module M,
FunctionAnalysisManager FAM,
InlineParams  Params,
InlineContext  IC 
)
inline

Definition at line 232 of file InlineAdvisor.h.


The documentation for this class was generated from the following files: