class CallGraphNode
Declaration
class CallGraphNode { /* full declaration omitted */ };
Description
A node in the call graph for a module. Typically represents a function in the call graph. There are also special "null" nodes used to represent theoretical entries in the call graph.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:164
Method Overview
- public CallGraphNode(const llvm::CallGraphNode &)
- public inline CallGraphNode(llvm::Function * F)
- public void addCalledFunction(llvm::CallBase * Call, llvm::CallGraphNode * M)
- public inline llvm::CallGraphNode::iterator begin()
- public inline llvm::CallGraphNode::const_iterator begin() const
- public void dump() const
- public inline bool empty() const
- public inline llvm::CallGraphNode::iterator end()
- public inline llvm::CallGraphNode::const_iterator end() const
- public llvm::Function * getFunction() const
- public unsigned int getNumReferences() const
- public void print(llvm::raw_ostream & OS) const
- public void removeAllCalledFunctions()
- public void removeAnyCallEdgeTo(llvm::CallGraphNode * Callee)
- public void removeCallEdge(llvm::CallGraphNode::iterator I)
- public void removeCallEdgeFor(llvm::CallBase & Call)
- public void removeOneAbstractEdgeTo(llvm::CallGraphNode * Callee)
- public void replaceCallEdge(llvm::CallBase & Call, llvm::CallBase & NewCall, llvm::CallGraphNode * NewNode)
- public inline unsigned int size() const
- public void stealCalledFunctionsFrom(llvm::CallGraphNode * N)
- public ~CallGraphNode()
Methods
¶CallGraphNode(const llvm::CallGraphNode&)
CallGraphNode(const llvm::CallGraphNode&)
Declared at: llvm/include/llvm/Analysis/CallGraph.h:176
Parameters
- const llvm::CallGraphNode&
¶inline CallGraphNode(llvm::Function* F)
inline CallGraphNode(llvm::Function* F)
Description
Creates a node for the specified function.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:174
Parameters
¶void addCalledFunction(llvm::CallBase* Call,
llvm::CallGraphNode* M)
void addCalledFunction(llvm::CallBase* Call,
llvm::CallGraphNode* M)
Description
Adds a function to the list of functions called by this one.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:232
Parameters
- llvm::CallBase* Call
- llvm::CallGraphNode* M
¶inline llvm::CallGraphNode::iterator begin()
inline llvm::CallGraphNode::iterator begin()
Declared at: llvm/include/llvm/Analysis/CallGraph.h:189
¶inline llvm::CallGraphNode::const_iterator begin()
const
inline llvm::CallGraphNode::const_iterator begin()
const
Declared at: llvm/include/llvm/Analysis/CallGraph.h:191
¶void dump() const
void dump() const
Description
Print out this call graph node.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:207
¶inline bool empty() const
inline bool empty() const
Declared at: llvm/include/llvm/Analysis/CallGraph.h:193
¶inline llvm::CallGraphNode::iterator end()
inline llvm::CallGraphNode::iterator end()
Declared at: llvm/include/llvm/Analysis/CallGraph.h:190
¶inline llvm::CallGraphNode::const_iterator end()
const
inline llvm::CallGraphNode::const_iterator end()
const
Declared at: llvm/include/llvm/Analysis/CallGraph.h:192
¶llvm::Function* getFunction() const
llvm::Function* getFunction() const
Description
Returns the function that this call graph node represents.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:187
¶unsigned int getNumReferences() const
unsigned int getNumReferences() const
Description
Returns the number of other CallGraphNodes in this CallGraph that reference this node in their callee list.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:198
¶void print(llvm::raw_ostream& OS) const
void print(llvm::raw_ostream& OS) const
Declared at: llvm/include/llvm/Analysis/CallGraph.h:208
Parameters
¶void removeAllCalledFunctions()
void removeAllCalledFunctions()
Description
Removes all edges from this CallGraphNode to any functions it calls.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:217
¶void removeAnyCallEdgeTo(
llvm::CallGraphNode* Callee)
void removeAnyCallEdgeTo(
llvm::CallGraphNode* Callee)
Description
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.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:256
Parameters
- llvm::CallGraphNode* Callee
¶void removeCallEdge(
llvm::CallGraphNode::iterator I)
void removeCallEdge(
llvm::CallGraphNode::iterator I)
Declared at: llvm/include/llvm/Analysis/CallGraph.h:240
Parameters
- llvm::CallGraphNode::iterator I
¶void removeCallEdgeFor(llvm::CallBase& Call)
void removeCallEdgeFor(llvm::CallBase& Call)
Description
Removes the edge in the node for the specified call site. Note that this method takes linear time, so it should be used sparingly.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:249
Parameters
- llvm::CallBase& Call
¶void removeOneAbstractEdgeTo(
llvm::CallGraphNode* Callee)
void removeOneAbstractEdgeTo(
llvm::CallGraphNode* Callee)
Description
Removes one edge associated with a null callsite from this node to the specified callee function.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:260
Parameters
- llvm::CallGraphNode* Callee
¶void replaceCallEdge(llvm::CallBase& Call,
llvm::CallBase& NewCall,
llvm::CallGraphNode* NewNode)
void replaceCallEdge(llvm::CallBase& Call,
llvm::CallBase& NewCall,
llvm::CallGraphNode* NewNode)
Description
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.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:266
Parameters
- llvm::CallBase& Call
- llvm::CallBase& NewCall
- llvm::CallGraphNode* NewNode
¶inline unsigned int size() const
inline unsigned int size() const
Declared at: llvm/include/llvm/Analysis/CallGraph.h:194
¶void stealCalledFunctionsFrom(
llvm::CallGraphNode* N)
void stealCalledFunctionsFrom(
llvm::CallGraphNode* N)
Description
Moves all the callee information from N to this node.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:225
Parameters
¶~CallGraphNode()
~CallGraphNode()
Declared at: llvm/include/llvm/Analysis/CallGraph.h:179