LLVM API Documentation

Public Member Functions
llvm::Inliner Struct Reference

#include <InlinerPass.h>

Inheritance diagram for llvm::Inliner:
Inheritance graph
[legend]
Collaboration diagram for llvm::Inliner:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Inliner (char &ID)
 Inliner (char &ID, int Threshold, bool InsertLifetime)
void getAnalysisUsage (AnalysisUsage &Info) const override
bool runOnSCC (CallGraphSCC &SCC) override
bool doFinalization (CallGraph &CG) override
unsigned getInlineThreshold () const
unsigned getInlineThreshold (CallSite CS) const
virtual InlineCost getInlineCost (CallSite CS)=0
bool removeDeadFunctions (CallGraph &CG, bool AlwaysInlineOnly=false)

Detailed Description

Inliner - This class contains all of the helper code which is used to perform the inlining operations that do not depend on the policy.

Definition at line 32 of file InlinerPass.h.


Constructor & Destructor Documentation

Inliner::Inliner ( char &  ID) [explicit]

Definition at line 67 of file Inliner.cpp.

Inliner::Inliner ( char &  ID,
int  Threshold,
bool  InsertLifetime 
) [explicit]

Definition at line 70 of file Inliner.cpp.


Member Function Documentation

bool Inliner::doFinalization ( CallGraph CG) [override, virtual]

doFinalization - This method is called after the SCC's of the program has been processed, allowing the pass to do final cleanup as necessary.

Reimplemented from llvm::CallGraphSCCPass.

Definition at line 641 of file Inliner.cpp.

References removeDeadFunctions().

void Inliner::getAnalysisUsage ( AnalysisUsage AU) const [override, virtual]

getAnalysisUsage - 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.

Reimplemented from llvm::CallGraphSCCPass.

Definition at line 78 of file Inliner.cpp.

References llvm::AnalysisUsage::addRequired().

virtual InlineCost llvm::Inliner::getInlineCost ( CallSite  CS) [pure virtual]

getInlineCost - 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.

This method returns the value specified by the -inline-threshold value, specified on the command line. This is typically not directly needed.

Definition at line 53 of file InlinerPass.h.

bool Inliner::removeDeadFunctions ( CallGraph CG,
bool  AlwaysInlineOnly = false 
)
bool Inliner::runOnSCC ( CallGraphSCC SCC) [override, virtual]

runOnSCC - This method should be implemented by the subclass to perform whatever action is necessary for the specified SCC. Note that non-recursive (or only self-recursive) functions will have an SCC size of 1, where recursive portions of the call graph will have SCC size > 1.

SCC passes that add or delete functions to the SCC are required to update the SCC list, otherwise stale pointers may be dereferenced.

Implements llvm::CallGraphSCCPass.

Definition at line 444 of file Inliner.cpp.

References llvm::SmallVectorTemplateCommon< T >::back(), llvm::CallGraphSCC::begin(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::Function::begin(), llvm::dbgs(), DEBUG, DEBUG_TYPE, llvm::emitOptimizationRemark(), llvm::emitOptimizationRemarkMissed(), llvm::SmallVectorBase::empty(), llvm::CallGraphSCC::end(), llvm::Function::end(), llvm::SmallVectorImpl< T >::erase(), llvm::Instruction::eraseFromParent(), F(), llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getCaller(), llvm::Function::getContext(), llvm::Instruction::getDebugLoc(), llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::Value::getName(), llvm::GlobalValue::hasLocalLinkage(), I, InlineCallIfPossible(), llvm::InlineFunctionInfo::InlinedCalls, InlineHistoryIncludes(), llvm::GlobalValue::isDeclaration(), llvm::isInstructionTriviallyDead(), llvm::CallGraphSCC::isSingular(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::pop_back(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::CallGraph::removeFunctionFromModule(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::SmallVectorTemplateCommon< T >::size(), std::swap(), and llvm::Value::use_empty().


The documentation for this struct was generated from the following files: