LLVM API Documentation
#include <CallGraph.h>
Public Types | |
typedef std::pair< WeakVH, CallGraphNode * > | CallRecord |
typedef std::vector< CallRecord > | CalledFunctionsVector |
typedef std::vector < CallRecord >::iterator | iterator |
typedef std::vector < CallRecord >::const_iterator | const_iterator |
Public Member Functions | |
CallGraphNode (Function *f) | |
~CallGraphNode () | |
Function * | getFunction () const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
bool | empty () const |
unsigned | size () const |
unsigned | getNumReferences () const |
CallGraphNode * | operator[] (unsigned i) const |
void | dump () const |
void | print (raw_ostream &OS) const |
void | removeAllCalledFunctions () |
void | stealCalledFunctionsFrom (CallGraphNode *N) |
void | addCalledFunction (CallSite CS, CallGraphNode *M) |
void | removeCallEdge (iterator I) |
void | removeCallEdgeFor (CallSite CS) |
void | removeAnyCallEdgeTo (CallGraphNode *Callee) |
void | removeOneAbstractEdgeTo (CallGraphNode *Callee) |
void | replaceCallEdge (CallSite CS, CallSite NewCS, CallGraphNode *NewNode) |
void | allReferencesDropped () |
Friends | |
class | CallGraph |
Definition at line 173 of file CallGraph.h.
typedef std::vector<CallRecord> llvm::CallGraphNode::CalledFunctionsVector |
Definition at line 195 of file CallGraph.h.
typedef std::pair<WeakVH, CallGraphNode*> llvm::CallGraphNode::CallRecord |
Definition at line 181 of file CallGraph.h.
typedef std::vector<CallRecord>::const_iterator llvm::CallGraphNode::const_iterator |
Definition at line 209 of file CallGraph.h.
typedef std::vector<CallRecord>::iterator llvm::CallGraphNode::iterator |
Definition at line 208 of file CallGraph.h.
|
inline |
Definition at line 199 of file CallGraph.h.
|
inline |
Definition at line 200 of file CallGraph.h.
|
inline |
addCalledFunction - Add a function to the list of functions called by this one.
Definition at line 262 of file CallGraph.h.
References llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), and llvm::Function::isIntrinsic().
Referenced by UpdateCallGraphAfterInlining().
|
inline |
allReferencesDropped - This is a special function that should only be used by the CallGraph class.
Definition at line 298 of file CallGraph.h.
|
inline |
Definition at line 214 of file CallGraph.h.
Referenced by llvm::GraphTraits< CallGraphNode * >::child_begin(), llvm::GraphTraits< const CallGraphNode * >::child_begin(), print(), and UpdateCallGraphAfterInlining().
|
inline |
Definition at line 216 of file CallGraph.h.
void CallGraphNode::dump | ( | ) | const |
dump - Print out this call graph node.
Definition at line 200 of file CallGraph.cpp.
References llvm::dbgs(), and print().
|
inline |
Definition at line 218 of file CallGraph.h.
Referenced by llvm::CallGraph::removeFunctionFromModule().
|
inline |
Definition at line 215 of file CallGraph.h.
Referenced by llvm::GraphTraits< CallGraphNode * >::child_end(), llvm::GraphTraits< const CallGraphNode * >::child_end(), print(), and UpdateCallGraphAfterInlining().
|
inline |
Definition at line 217 of file CallGraph.h.
|
inline |
Definition at line 212 of file CallGraph.h.
References F().
Referenced by llvm::DOTGraphTraits< CallGraph * >::getNodeLabel(), llvm::CallGraph::print(), print(), llvm::Inliner::removeDeadFunctions(), and llvm::CallGraph::removeFunctionFromModule().
|
inline |
getNumReferences - Return the number of other CallGraphNodes in this CallGraph that reference this node in their callee list.
Definition at line 223 of file CallGraph.h.
Referenced by print().
|
inline |
Definition at line 227 of file CallGraph.h.
void CallGraphNode::print | ( | raw_ostream & | OS | ) | const |
Definition at line 181 of file CallGraph.cpp.
References begin(), end(), getFunction(), llvm::Value::getName(), getNumReferences(), and I.
Referenced by dump().
|
inline |
removeAllCalledFunctions - As the name implies, this removes all edges from this CallGraphNode to any functions it calls.
Definition at line 244 of file CallGraph.h.
Referenced by llvm::Inliner::removeDeadFunctions().
void CallGraphNode::removeAnyCallEdgeTo | ( | CallGraphNode * | Callee | ) |
removeAnyCallEdgeTo - This method removes all call edges from this node to the specified callee function. This takes more time to execute than removeCallEdgeTo, so it should not be used unless necessary.
Definition at line 221 of file CallGraph.cpp.
Referenced by llvm::Inliner::removeDeadFunctions().
|
inline |
Definition at line 270 of file CallGraph.h.
void CallGraphNode::removeCallEdgeFor | ( | CallSite | CS | ) |
removeCallEdgeFor - This method removes the edge in the node for the specified call site. Note that this method takes linear time, so it should be used sparingly.
Definition at line 206 of file CallGraph.cpp.
References llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), and I.
Referenced by UpdateCallGraphAfterInlining().
void CallGraphNode::removeOneAbstractEdgeTo | ( | CallGraphNode * | Callee | ) |
removeOneAbstractEdgeTo - Remove one edge associated with a null callsite from this node to the specified callee function.
Definition at line 233 of file CallGraph.cpp.
References I.
void CallGraphNode::replaceCallEdge | ( | CallSite | CS, |
CallSite | NewCS, | ||
CallGraphNode * | NewNode | ||
) |
replaceCallEdge - This method replaces the edge in the node for the specified call site with a new one. Note that this method takes linear time, so it should be used sparingly.
Definition at line 249 of file CallGraph.cpp.
References llvm::CallSiteBase< FunTy, ValTy, UserTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), and I.
|
inline |
Definition at line 219 of file CallGraph.h.
|
inline |
stealCalledFunctionsFrom - Move all the callee information from N to this node.
Definition at line 253 of file CallGraph.h.
References std::swap().
|
friend |
Definition at line 174 of file CallGraph.h.