struct LegacyInlinerBase

Declaration

struct LegacyInlinerBase : public CallGraphSCCPass { /* full declaration omitted */ };

Description

This class contains all of the helper code which is used to perform the inlining operations that do not depend on the policy. It contains the core bottom-up inlining infrastructure that specific inliner passes use.

Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:30

Inherits from: CallGraphSCCPass

Member Variables

protected llvm::AssumptionCacheTracker* ACT
protected llvm::ProfileSummaryInfo* PSI
protected llvm::ImportedFunctionsInliningStatistics ImportedFunctionsStats

Method Overview

Inherited from CallGraphSCCPass:

Inherited from Pass:

Methods

LegacyInlinerBase(char& ID)

Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:31

Parameters

char& ID

LegacyInlinerBase(char& ID, bool InsertLifetime)

Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:32

Parameters

char& ID
bool InsertLifetime

bool doFinalization(llvm::CallGraph& CG)

Description

Remove now-dead linkonce functions at the end of processing to avoid breaking the SCC traversal.

Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:49

Parameters

llvm::CallGraph& CG

bool doInitialization(llvm::CallGraph& CG)

Description

doInitialization - This method is called before the SCC's of the program has been processed, allowing the pass to do initialization as necessary.

Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:39

Parameters

llvm::CallGraph& CG

void getAnalysisUsage(
    llvm::AnalysisUsage& Info) const

Description

For this class, we declare that we require and preserve the call graph. If the derived class implements this method, it should always explicitly call the implementation here.

Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:37

Parameters

llvm::AnalysisUsage& Info

virtual llvm::InlineCost getInlineCost(
    llvm::CallSite CS)

Description

This method must be implemented by the subclass to determine the cost of inlining the specified call site. If the cost returned is greater than the current inline threshold, the call site is not inlined.

Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:54

Parameters

llvm::CallSite CS

bool inlineCalls(llvm::CallGraphSCC& SCC)

Description

This function performs the main work of the pass. The default of Inlinter::runOnSCC() calls skipSCC() before calling this method, but derived classes which cannot be skipped can override that method and call this function unconditionally.

Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:68

Parameters

llvm::CallGraphSCC& SCC

bool removeDeadFunctions(
    llvm::CallGraph& CG,
    bool AlwaysInlineOnly = false)

Description

Remove dead functions. This also includes a hack in the form of the 'AlwaysInlineOnly' flag which restricts it to deleting functions with an 'AlwaysInline' attribute. This is useful for the InlineAlways pass that only wants to deal with that subset of the functions.

Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:62

Parameters

llvm::CallGraph& CG
bool AlwaysInlineOnly = false

bool runOnSCC(llvm::CallGraphSCC& SCC)

Description

Main run interface method, this implements the interface required by the Pass class.

Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:43

Parameters

llvm::CallGraphSCC& SCC