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.
|
Definition at line 36 of file Inliner.cpp. |
|
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(). |
|
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(). |
|
This method returns the value specified by the -inline-threshold value, specified on the command line. This is typically not directly needed. |
|
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. |