LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::Inliner Struct Reference

#include <Inliner.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 ()
virtual bool runOnSCC (const std::vector< CallGraphNode * > &SCC)
virtual bool doFinalization (CallGraph &CG)
unsigned getInlineThreshold () const
virtual int getInlineCost (CallSite CS)=0

Detailed Description

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

Definition at line 29 of file Inliner.h.


Constructor & Destructor Documentation

Inliner::Inliner  ) 
 

Definition at line 36 of file Inliner.cpp.


Member Function Documentation

bool Inliner::doFinalization CallGraph CG  )  [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 163 of file Inliner.cpp.

References llvm::CallGraphNode::begin(), llvm::CallGraph::begin(), E, llvm::CallGraphNode::end(), llvm::CallGraph::end(), F, llvm::CallGraph::getExternalCallingNode(), llvm::CallGraphNode::getFunction(), I, NumDeleted, llvm::CallGraphNode::removeAnyCallEdgeTo(), llvm::CallGraphNode::removeCallEdgeTo(), and llvm::CallGraph::removeFunctionFromModule().

virtual int 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.

Referenced by runOnSCC().

unsigned llvm::Inliner::getInlineThreshold  )  const [inline]
 

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 44 of file Inliner.h.

bool Inliner::runOnSCC const std::vector< CallGraphNode * > &  SCC  )  [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.

Implements llvm::CallGraphSCCPass.

Definition at line 75 of file Inliner.cpp.

References DEBUG, E, F, llvm::CallSite::get(), llvm::CallSite::getCalledFunction(), getInlineCost(), llvm::CallSite::getInstruction(), llvm::BasicBlock::getParent(), llvm::Instruction::getParent(), I, InlineCallIfPossible(), llvm::Function::isExternal(), and NumInlined.


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