LLVM  16.0.0git
Public Member Functions | List of all members
llvm::ReplayInlineAdvisor Class Reference

Replay inline advisor that uses optimization remarks from inlining of previous build to guide current inlining. More...

#include "llvm/Analysis/ReplayInlineAdvisor.h"

Inheritance diagram for llvm::ReplayInlineAdvisor:
Inheritance graph
[legend]
Collaboration diagram for llvm::ReplayInlineAdvisor:
Collaboration graph
[legend]

Public Member Functions

 ReplayInlineAdvisor (Module &M, FunctionAnalysisManager &FAM, LLVMContext &Context, std::unique_ptr< InlineAdvisor > OriginalAdvisor, const ReplayInlinerSettings &ReplaySettings, bool EmitRemarks, InlineContext IC)
 
std::unique_ptr< InlineAdvicegetAdviceImpl (CallBase &CB) override
 
bool areReplayRemarksLoaded () const
 
- 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. More...
 
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). More...
 
virtual void onPassExit (LazyCallGraph::SCC *SCC=nullptr)
 This must be called when the Inliner pass is exited, as function passes may be run subsequently. More...
 
virtual void print (raw_ostream &OS) const
 Support for printer pass. More...
 
const char * getAnnotatedInlinePassName () const
 NOTE pass name is annotated only when inline advisor constructor provides InlineContext. More...
 

Additional Inherited Members

- Protected Types inherited from llvm::InlineAdvisor
enum  MandatoryInliningKind { MandatoryInliningKind::NotMandatory, MandatoryInliningKind::Always, MandatoryInliningKind::Never }
 
- Protected Member Functions inherited from llvm::InlineAdvisor
 InlineAdvisor (Module &M, FunctionAnalysisManager &FAM, Optional< InlineContext > IC=NoneType::None)
 
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 Optional< InlineContextIC
 
const std::string AnnotatedInlinePassName
 
std::unique_ptr< ImportedFunctionsInliningStatisticsImportedFunctionsStats
 

Detailed Description

Replay inline advisor that uses optimization remarks from inlining of previous build to guide current inlining.

This is useful for inliner tuning.

Definition at line 65 of file ReplayInlineAdvisor.h.

Constructor & Destructor Documentation

◆ ReplayInlineAdvisor()

ReplayInlineAdvisor::ReplayInlineAdvisor ( Module M,
FunctionAnalysisManager FAM,
LLVMContext Context,
std::unique_ptr< InlineAdvisor OriginalAdvisor,
const ReplayInlinerSettings ReplaySettings,
bool  EmitRemarks,
InlineContext  IC 
)

Member Function Documentation

◆ areReplayRemarksLoaded()

bool llvm::ReplayInlineAdvisor::areReplayRemarksLoaded ( ) const
inline

Definition at line 73 of file ReplayInlineAdvisor.h.

◆ getAdviceImpl()

std::unique_ptr< InlineAdvice > ReplayInlineAdvisor::getAdviceImpl ( CallBase CB)
overridevirtual

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