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
- public LegacyInlinerBase(char & ID)
- public LegacyInlinerBase(char & ID, bool InsertLifetime)
- public bool doFinalization(llvm::CallGraph & CG)
- public bool doInitialization(llvm::CallGraph & CG)
- public void getAnalysisUsage(llvm::AnalysisUsage & Info) const
- public virtual llvm::InlineCost getInlineCost(llvm::CallSite CS)
- public bool inlineCalls(llvm::CallGraphSCC & SCC)
- public bool removeDeadFunctions(llvm::CallGraph & CG, bool AlwaysInlineOnly = false)
- public bool runOnSCC(llvm::CallGraphSCC & SCC)
Inherited from CallGraphSCCPass:
- public assignPassManager
- public createPrinterPass
- public doFinalization
- public doInitialization
- public getAnalysisUsage
- public getPotentialPassManagerType
- public runOnSCC
- protected skipSCC
Inherited from Pass:
- public assignPassManager
- public createPass
- public createPrinterPass
- public doFinalization
- public doInitialization
- public dump
- public dumpPassStructure
- public getAdjustedAnalysisPointer
- public getAnalysis
- public getAnalysis
- public getAnalysisID
- public getAnalysisID
- public getAnalysisIfAvailable
- public getAnalysisUsage
- public getAsImmutablePass
- public getAsPMDataManager
- public getPassID
- public getPassKind
- public getPassName
- public getPotentialPassManagerType
- public getResolver
- public lookupPassInfo
- public lookupPassInfo
- public mustPreserveAnalysisID
- public preparePassManager
- public print
- public releaseMemory
- public setResolver
- public verifyAnalysis
Methods
¶LegacyInlinerBase(char& ID)
LegacyInlinerBase(char& ID)
Declared at: llvm/include/llvm/Transforms/IPO/Inliner.h:31
Parameters
- char& ID
¶LegacyInlinerBase(char& ID, bool InsertLifetime)
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)
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)
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
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)
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
¶bool inlineCalls(llvm::CallGraphSCC& SCC)
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)
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)
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