LLVM  15.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)
 
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 ()
 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...
 

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)
 
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
 
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 63 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 
)

Member Function Documentation

◆ areReplayRemarksLoaded()

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

Definition at line 71 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: