LLVM  15.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]
Collaboration diagram for llvm::MLInlineAdvice:
Collaboration 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. More...
 
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. More...
 
void recordUnsuccessfulInlining (const InlineResult &Result)
 Call after the decision for a call site was to not inline. More...
 
void recordUnattemptedInlining ()
 Call to indicate inlining was not attempted. More...
 
bool isInliningRecommended () const
 Get the inlining recommendation. More...
 
const DebugLocgetOriginalCallSiteDebugLoc () const
 
const BasicBlockgetOriginalCallSiteBasicBlock () const
 

Public Attributes

const int64_t CallerIRSize
 
const int64_t CalleeIRSize
 
const int64_t CallerAndCalleeEdges
 

Additional Inherited Members

- Protected Attributes inherited from llvm::InlineAdvice
InlineAdvisor *const Advisor
 
Function *const Caller
 Caller and Callee are pre-inlining. More...
 
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 90 of file MLInlineAdvisor.h.

Constructor & Destructor Documentation

◆ MLInlineAdvice()

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

Definition at line 425 of file MLInlineAdvisor.cpp.

References llvm::InlineAdvice::Advisor, Callee, 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 450 of file MLInlineAdvisor.cpp.

References FAM.

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

Member Data Documentation

◆ CalleeIRSize

const int64_t llvm::MLInlineAdvice::CalleeIRSize

Definition at line 105 of file MLInlineAdvisor.h.

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

◆ CallerAndCalleeEdges

const int64_t llvm::MLInlineAdvice::CallerAndCalleeEdges

Definition at line 106 of file MLInlineAdvisor.h.

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

◆ CallerIRSize

const int64_t llvm::MLInlineAdvice::CallerIRSize

Definition at line 104 of file MLInlineAdvisor.h.

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


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