LLVM 20.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::MLInlineAdvice Class Reference

InlineAdvice that tracks changes post inlining. More...

#include "llvm/Analysis/MLInlineAdvisor.h"

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

Public Member Functions

 MLInlineAdvice (MLInlineAdvisor *Advisor, CallBase &CB, OptimizationRemarkEmitter &ORE, bool Recommendation)
 
virtual ~MLInlineAdvice ()=default
 
void recordInliningImpl () override
 
void recordInliningWithCalleeDeletedImpl () override
 
void recordUnsuccessfulInliningImpl (const InlineResult &Result) override
 
void recordUnattemptedInliningImpl () override
 
FunctiongetCaller () const
 
FunctiongetCallee () const
 
void updateCachedCallerFPI (FunctionAnalysisManager &FAM) const
 
- Public Member Functions inherited from llvm::InlineAdvice
 InlineAdvice (InlineAdvisor *Advisor, CallBase &CB, OptimizationRemarkEmitter &ORE, bool IsInliningRecommended)
 
 InlineAdvice (InlineAdvice &&)=delete
 
 InlineAdvice (const InlineAdvice &)=delete
 
virtual ~InlineAdvice ()
 
void recordInlining ()
 Exactly one of the record* APIs must be called.
 
void recordInliningWithCalleeDeleted ()
 Call after inlining succeeded, and results in the callee being delete-able, meaning, it has no more users, and will be cleaned up subsequently.
 
void recordUnsuccessfulInlining (const InlineResult &Result)
 Call after the decision for a call site was to not inline.
 
void recordUnattemptedInlining ()
 Call to indicate inlining was not attempted.
 
bool isInliningRecommended () const
 Get the inlining recommendation.
 
const DebugLocgetOriginalCallSiteDebugLoc () const
 
const BasicBlockgetOriginalCallSiteBasicBlock () const
 

Public Attributes

const int64_t CallerIRSize
 
const int64_t CalleeIRSize
 
const int64_t CallerAndCalleeEdges
 

Additional Inherited Members

virtual void recordInliningImpl ()
 
virtual void recordInliningWithCalleeDeletedImpl ()
 
virtual void recordUnsuccessfulInliningImpl (const InlineResult &Result)
 
virtual void recordUnattemptedInliningImpl ()
 
- Protected Attributes inherited from llvm::InlineAdvice
InlineAdvisor *const Advisor
 
Function *const Caller
 Caller and Callee are pre-inlining.
 
Function *const Callee
 
const DebugLoc DLoc
 
const BasicBlock *const Block
 
OptimizationRemarkEmitterORE
 
const bool IsInliningRecommended
 

Detailed Description

InlineAdvice that tracks changes post inlining.

For that reason, it only overrides the "successful inlining" extension points.

Definition at line 98 of file MLInlineAdvisor.h.

Constructor & Destructor Documentation

◆ MLInlineAdvice()

MLInlineAdvice::MLInlineAdvice ( MLInlineAdvisor Advisor,
CallBase CB,
OptimizationRemarkEmitter ORE,
bool  Recommendation 
)

Definition at line 505 of file MLInlineAdvisor.cpp.

References llvm::InlineAdvice::Advisor, and getCaller().

◆ ~MLInlineAdvice()

virtual llvm::MLInlineAdvice::~MLInlineAdvice ( )
virtualdefault

Member Function Documentation

◆ getCallee()

Function * llvm::MLInlineAdvice::getCallee ( ) const
inline

◆ getCaller()

Function * llvm::MLInlineAdvice::getCaller ( ) const
inline

◆ recordInliningImpl()

void MLInlineAdvice::recordInliningImpl ( )
overridevirtual

◆ recordInliningWithCalleeDeletedImpl()

void MLInlineAdvice::recordInliningWithCalleeDeletedImpl ( )
overridevirtual

◆ recordUnattemptedInliningImpl()

void MLInlineAdvice::recordUnattemptedInliningImpl ( )
overridevirtual

◆ recordUnsuccessfulInliningImpl()

void MLInlineAdvice::recordUnsuccessfulInliningImpl ( const InlineResult Result)
overridevirtual

◆ updateCachedCallerFPI()

void MLInlineAdvice::updateCachedCallerFPI ( FunctionAnalysisManager FAM) const

Definition at line 530 of file MLInlineAdvisor.cpp.

References FAM.

Referenced by llvm::MLInlineAdvisor::onSuccessfulInlining().

Member Data Documentation

◆ CalleeIRSize

const int64_t llvm::MLInlineAdvice::CalleeIRSize

Definition at line 113 of file MLInlineAdvisor.h.

Referenced by llvm::MLInlineAdvisor::onSuccessfulInlining().

◆ CallerAndCalleeEdges

const int64_t llvm::MLInlineAdvice::CallerAndCalleeEdges

Definition at line 114 of file MLInlineAdvisor.h.

Referenced by llvm::MLInlineAdvisor::onSuccessfulInlining().

◆ CallerIRSize

const int64_t llvm::MLInlineAdvice::CallerIRSize

Definition at line 112 of file MLInlineAdvisor.h.

Referenced by llvm::MLInlineAdvisor::onSuccessfulInlining().


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