LLVM: llvm::InlineAdvice Class Reference (original) (raw)

Capture state between an inlining decision having had been made, and its impact being observable. More...

#include "[llvm/Analysis/InlineAdvisor.h](InlineAdvisor%5F8h%5Fsource.html)"

Public Member Functions
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 DebugLoc & getOriginalCallSiteDebugLoc () const
const BasicBlock * getOriginalCallSiteBasicBlock () const
Protected Attributes
InlineAdvisor *const Advisor
Function *const Caller
Caller and Callee are pre-inlining.
Function *const Callee
const DebugLoc DLoc
const BasicBlock *const Block
OptimizationRemarkEmitter & ORE
const bool IsInliningRecommended

Capture state between an inlining decision having had been made, and its impact being observable.

When collecting model training data, this allows recording features/decisions/partial reward data sets.

Derivations of this type are expected to be tightly coupled with their InliningAdvisors. The base type implements the minimal contractual obligations.

Definition at line 75 of file InlineAdvisor.h.

Definition at line 190 of file InlineAdvisor.cpp.

References Advisor, Block, Callee, Caller, DLoc, getCalledFunction(), getDebugLoc(), getParent(), IsInliningRecommended, and ORE.

Referenced by llvm::DefaultInlineAdvice::DefaultInlineAdvice(), InlineAdvice(), InlineAdvice(), and llvm::MLInlineAdvice::MLInlineAdvice().

InlineAdvice() [2/3]

InlineAdvice() [3/3]

~InlineAdvice()

virtual llvm::InlineAdvice::~InlineAdvice ( ) inlinevirtual

getOriginalCallSiteBasicBlock()

const BasicBlock * llvm::InlineAdvice::getOriginalCallSiteBasicBlock ( ) const inline

getOriginalCallSiteDebugLoc()

const DebugLoc & llvm::InlineAdvice::getOriginalCallSiteDebugLoc ( ) const inline

isInliningRecommended()

bool llvm::InlineAdvice::isInliningRecommended ( ) const inline

recordInlining()

void InlineAdvice::recordInlining ( )

Exactly one of the record* APIs must be called.

Implementers may extend behavior by implementing the corresponding record*Impl.

Call after inlining succeeded, and did not result in deleting the callee.

Definition at line 202 of file InlineAdvisor.cpp.

References recordInliningImpl().

recordInliningImpl()

virtual void llvm::InlineAdvice::recordInliningImpl ( ) inlineprotectedvirtual

recordInliningWithCalleeDeleted()

void InlineAdvice::recordInliningWithCalleeDeleted ( )

recordInliningWithCalleeDeletedImpl()

virtual void llvm::InlineAdvice::recordInliningWithCalleeDeletedImpl ( ) inlineprotectedvirtual

recordUnattemptedInlining()

void llvm::InlineAdvice::recordUnattemptedInlining ( ) inline

recordUnattemptedInliningImpl()

virtual void llvm::InlineAdvice::recordUnattemptedInliningImpl ( ) inlineprotectedvirtual

recordUnsuccessfulInlining()

void llvm::InlineAdvice::recordUnsuccessfulInlining ( const InlineResult & Result) inline

recordUnsuccessfulInliningImpl()

virtual void llvm::InlineAdvice::recordUnsuccessfulInliningImpl ( const InlineResult & Result) inlineprotectedvirtual

Advisor

Block

Callee

Caller

DLoc

IsInliningRecommended

const bool llvm::InlineAdvice::IsInliningRecommended protected

ORE


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