class CallGraph
Declaration
class CallGraph { /* full declaration omitted */ };
Description
The basic data container for the call graph of a \c Module of IR. This class exposes both the interface to the call graph for a module of IR. The core call graph itself can also be updated to reflect changes to the IR.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:73
Method Overview
- public CallGraph(llvm::Module & M)
- public CallGraph(llvm::CallGraph && Arg)
- public inline llvm::CallGraph::iterator begin()
- public inline llvm::CallGraph::const_iterator begin() const
- public void dump() const
- public inline llvm::CallGraph::iterator end()
- public inline llvm::CallGraph::const_iterator end() const
- public llvm::CallGraphNode * getCallsExternalNode() const
- public llvm::CallGraphNode * getExternalCallingNode() const
- public llvm::Module & getModule() const
- public llvm::CallGraphNode * getOrInsertFunction(const llvm::Function * F)
- public void print(llvm::raw_ostream & OS) const
- public llvm::Function * removeFunctionFromModule(llvm::CallGraphNode * CGN)
- public ~CallGraph()
Methods
¶CallGraph(llvm::Module& M)
CallGraph(llvm::Module& M)
Declared at: llvm/include/llvm/Analysis/CallGraph.h:102
Parameters
- llvm::Module& M
¶CallGraph(llvm::CallGraph&& Arg)
CallGraph(llvm::CallGraph&& Arg)
Declared at: llvm/include/llvm/Analysis/CallGraph.h:103
Parameters
- llvm::CallGraph&& Arg
¶inline llvm::CallGraph::iterator begin()
inline llvm::CallGraph::iterator begin()
Declared at: llvm/include/llvm/Analysis/CallGraph.h:115
¶inline llvm::CallGraph::const_iterator begin()
const
inline llvm::CallGraph::const_iterator begin()
const
Declared at: llvm/include/llvm/Analysis/CallGraph.h:117
¶void dump() const
void dump() const
Declared at: llvm/include/llvm/Analysis/CallGraph.h:107
¶inline llvm::CallGraph::iterator end()
inline llvm::CallGraph::iterator end()
Declared at: llvm/include/llvm/Analysis/CallGraph.h:116
¶inline llvm::CallGraph::const_iterator end() const
inline llvm::CallGraph::const_iterator end() const
Declared at: llvm/include/llvm/Analysis/CallGraph.h:118
¶llvm::CallGraphNode* getCallsExternalNode() const
llvm::CallGraphNode* getCallsExternalNode() const
Declared at: llvm/include/llvm/Analysis/CallGraph.h:138
¶llvm::CallGraphNode* getExternalCallingNode()
const
llvm::CallGraphNode* getExternalCallingNode()
const
Description
Returns the \c CallGraphNode which is used to represent undetermined calls into the callgraph.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:136
¶llvm::Module& getModule() const
llvm::Module& getModule() const
Description
Returns the module the call graph corresponds to.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:113
¶llvm::CallGraphNode* getOrInsertFunction(
const llvm::Function* F)
llvm::CallGraphNode* getOrInsertFunction(
const llvm::Function* F)
Description
Similar to operator[], but this will insert a new CallGraphNode for\c F if one does not already exist.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:157
Parameters
- const llvm::Function* F
¶void print(llvm::raw_ostream& OS) const
void print(llvm::raw_ostream& OS) const
Declared at: llvm/include/llvm/Analysis/CallGraph.h:106
Parameters
¶llvm::Function* removeFunctionFromModule(
llvm::CallGraphNode* CGN)
llvm::Function* removeFunctionFromModule(
llvm::CallGraphNode* CGN)
Description
Unlink the function from this module, returning it. Because this removes the function from the module, the call graph node is destroyed. This is only valid if the function does not call any other functions (ie, there are no edges in it's CGN). The easiest way to do this is to dropAllReferences before calling this.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:153
Parameters
- llvm::CallGraphNode* CGN
¶~CallGraph()
~CallGraph()
Declared at: llvm/include/llvm/Analysis/CallGraph.h:104