LLVM 22.0.0git
llvm::MLInlineAdvice Class Reference

InlineAdvice that tracks changes post inlining. More...

#include "llvm/Analysis/MLInlineAdvisor.h"

Inheritance diagram for llvm::MLInlineAdvice:
[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
LLVM_ABI InlineAdvice (InlineAdvisor *Advisor, CallBase &CB, OptimizationRemarkEmitter &ORE, bool IsInliningRecommended)
 InlineAdvice (InlineAdvice &&)=delete
 InlineAdvice (const InlineAdvice &)=delete
virtual ~InlineAdvice ()
LLVM_ABI void recordInlining ()
 Exactly one of the record* APIs must be called.
LLVM_ABI 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

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 104 of file MLInlineAdvisor.h.

Constructor & Destructor Documentation

◆ MLInlineAdvice()

◆ ~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 573 of file MLInlineAdvisor.cpp.

References FAM.

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

Member Data Documentation

◆ CalleeIRSize

const int64_t llvm::MLInlineAdvice::CalleeIRSize

◆ CallerAndCalleeEdges

const int64_t llvm::MLInlineAdvice::CallerAndCalleeEdges

◆ CallerIRSize

const int64_t llvm::MLInlineAdvice::CallerIRSize

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