Interface for deciding whether to inline a call site or not.

Synopsis

Declared in <llvm/Analysis/InlineAdvisor.h>

class InlineAdvisor;

Member Functions

Name

Description

InlineAdvisor [constructor] [deleted]

Deleted; InlineAdvisor is not movable.

~InlineAdvisor [destructor] [virtual]

Destroy the advisor and any owned statistics.

getAdvice

Get an InlineAdvice recommending whether to inline call site CB.

getAnnotatedInlinePassName

NOTE pass name is annotated only when inline advisor constructor provides InlineContext.

onPassEntry [virtual]

Update advisor state when the Inliner pass is entered.

onPassExit [virtual]

Prepare advisor state when the Inliner pass is exited.

print [virtual]

Print advisor state to OS.

Protected Enums

Name

Description

MandatoryInliningKind

Kind of mandatory inlining constraint on a call site.

Protected Member Functions

Name

Description

InlineAdvisor [constructor]

Construct an advisor for module M using analyses from FAM.

getAdviceImpl [virtual]

Compute advice for call site CB.

getCallerORE

Return the OptimizationRemarkEmitter for the caller of CB.

getMandatoryAdvice [virtual]

Compute mandatory (always/never) advice for call site CB.

Protected Static Member Functions

Name

Description

getMandatoryKind

Classify the mandatory inlining kind of call site CB.

Protected Data Members

Name

Description

AnnotatedInlinePassName

Annotated inline pass name for remarks, when IC was provided.

FAM

Function analysis manager providing analyses for advice.

IC

Optional pipeline context used when constructing this advisor.

ImportedFunctionsStats

Statistics for functions imported and then inlined.

M

Module whose call sites are advised.

Friends

Name

Description

llvm::InlineAdvice

Captures state between an inlining decision and observing its impact.

Non-Member Functions

Name

Description

getDevelopmentModeAdvisor

Create a development‐mode (dynamic model) InlineAdvisor for M.

getReleaseModeAdvisor

Create a release‐mode (compiled‐in model) InlineAdvisor for M.

getReplayInlineAdvisor

Create a replay inline advisor that consults prior inlining remarks.

Derived Classes

Name

Description

DefaultInlineAdvisor

The default (manual heuristics) implementation of the InlineAdvisor.

MLInlineAdvisor

InlineAdvisor that uses an ML model runner to decide whether to inline.

ReplayInlineAdvisor

Replay inline advisor that uses optimization remarks from inlining of previous build to guide current inlining. This is useful for inliner tuning.

Created with MrDocs