LLVM API Documentation
#include <Inliner.h>
Inheritance diagram for llvm::Inliner:
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 |
Definition at line 29 of file Inliner.h.
Inliner::Inliner | ( | ) |
Definition at line 38 of file Inliner.cpp.
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 155 of file Inliner.cpp.
References llvm::CallGraph::begin(), Changed, E, llvm::CallGraph::end(), F, llvm::CallGraph::getExternalCallingNode(), I, NumDeleted, llvm::CallGraphNode::removeAnyCallEdgeTo(), 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] |
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 67 of file Inliner.cpp.
References BB, llvm::BasicBlock::begin(), CallSites, Changed, DEBUG, E, llvm::BasicBlock::end(), F, llvm::CallSite::get(), getInlineCost(), llvm::CallSite::getInstruction(), llvm::BasicBlock::getParent(), llvm::Instruction::getParent(), I, InlineCallIfPossible(), and NumInlined.