LLVM  12.0.0git

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

#include "llvm/Analysis/InlineAdvisor.h"

[legend]
[legend]

Public Member Functions

Get an InlineAdvice containing a recommendation on whether to inline or not. More...

virtual void onPassEntry ()
This must be called when the Inliner pass is entered, to allow the InlineAdvisor update internal state, as result of function passes run between Inliner pass runs (for the same module). More...

virtual void onPassExit ()
This must be called when the Inliner pass is exited, as function passes may be run subsequently. More...

Protected Member Functions

void freeDeletedFunctions ()
We may want to defer deleting functions to after the inlining for a whole module has finished. More...

bool isFunctionDeleted (const Function *F) const

Protected Attributes

FunctionAnalysisManagerFAM

Detailed Description

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

Definition at line 119 of file InlineAdvisor.h.

Constructor & Destructor Documentation

delete

inlinevirtual

Definition at line 122 of file InlineAdvisor.h.

inlineprotected

Definition at line 141 of file InlineAdvisor.h.

◆ freeDeletedFunctions()

protected

We may want to defer deleting functions to after the inlining for a whole module has finished.

This allows us to reliably use function pointers as unique identifiers, as an efficient implementation detail of the InlineAdvisor. Otherwise, it is possible the memory allocator re-allocate Function objects at the same address of a deleted Function; and Functions are potentially created during the function passes called after each SCC inlining (e.g. argument promotion does that).

Definition at line 141 of file InlineAdvisor.cpp.

References F().

pure virtual

Get an InlineAdvice containing a recommendation on whether to inline or not.

CB is assumed to be a direct call. FAM is assumed to be up-to-date wrt previous inlining decisions. Returns an InlineAdvice with the inlining recommendation.

Referenced by llvm::InlinerPass::run().

◆ isFunctionDeleted()

 bool llvm::InlineAdvisor::isFunctionDeleted ( const Function * F ) const
inlineprotected

Definition at line 154 of file InlineAdvisor.h.

◆ onPassEntry()

inlinevirtual

This must be called when the Inliner pass is entered, to allow the InlineAdvisor update internal state, as result of function passes run between Inliner pass runs (for the same module).

Definition at line 133 of file InlineAdvisor.h.

Referenced by llvm::InlinerPass::run().

◆ onPassExit()

inlinevirtual

This must be called when the Inliner pass is exited, as function passes may be run subsequently.

This allows an implementation of InlineAdvisor to prepare for a partial update.

Definition at line 138 of file InlineAdvisor.h.

Referenced by llvm::InlinerPass::run().

Friends And Related Function Documentation

friend

Definition at line 159 of file InlineAdvisor.h.