class InlineAdvice

Declaration

class InlineAdvice { /* full declaration omitted */ };

Description

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.

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:74

Member Variables

protected llvm::InlineAdvisor* const Advisor
protected llvm::Function* const Caller
Caller and Callee are pre-inlining.
protected llvm::Function* const Callee
protected const llvm::DebugLoc DLoc
protected const llvm::BasicBlock* const Block
protected llvm::OptimizationRemarkEmitter& ORE
protected const bool IsInliningRecommended
private bool Recorded = false

Method Overview

Methods

InlineAdvice(llvm::InlineAdvice&&)

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:79

Parameters

llvm::InlineAdvice&&

InlineAdvice(const llvm::InlineAdvice&)

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:80

Parameters

const llvm::InlineAdvice&

InlineAdvice(llvm::InlineAdvisor* Advisor,
             llvm::CallBase& CB,
             llvm::OptimizationRemarkEmitter& ORE,
             bool IsInliningRecommended)

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:76

Parameters

llvm::InlineAdvisor* Advisor
llvm::CallBase& CB
llvm::OptimizationRemarkEmitter& ORE
bool IsInliningRecommended

const llvm::BasicBlock*
getOriginalCallSiteBasicBlock() const

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:112

const llvm::DebugLoc&
getOriginalCallSiteDebugLoc() const

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:111

bool isInliningRecommended() const

Description

Get the inlining recommendation.

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:110

void markRecorded()

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:134

void recordInlineStatsIfNeeded()

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:138

void recordInlining()

Description

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.

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:90

virtual void recordInliningImpl()

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:115

void recordInliningWithCalleeDeleted()

Description

Call after inlining succeeded, and results in the callee being delete-able, meaning, it has no more users, and will be cleaned up subsequently.

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:95

virtual void recordInliningWithCalleeDeletedImpl()

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:116

void recordUnattemptedInlining()

Description

Call to indicate inlining was not attempted.

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:104

virtual void recordUnattemptedInliningImpl()

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:118

void recordUnsuccessfulInlining(
    const llvm::InlineResult& Result)

Description

Call after the decision for a call site was to not inline.

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:98

Parameters

const llvm::InlineResult& Result

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

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:117

Parameters

const llvm::InlineResult& Result

virtual ~InlineAdvice()

Declared at: llvm/include/llvm/Analysis/InlineAdvisor.h:81