LLVM: llvm::CallGraph Class Reference (original) (raw)
The basic data container for the call graph of a [Module](classllvm%5F1%5F1Module.html "A Module instance is used to store all the information related to an LLVM module.")
of IR. More...
#include "[llvm/Analysis/CallGraph.h](CallGraph%5F8h%5Fsource.html)"
Public Member Functions | |
---|---|
CallGraph (Module &M) | |
CallGraph (CallGraph &&Arg) | |
~CallGraph () | |
void | print (raw_ostream &OS) const |
void | dump () const |
Module & | getModule () const |
Returns the module the call graph corresponds to. | |
bool | invalidate (Module &, const PreservedAnalyses &PA, ModuleAnalysisManager::Invalidator &) |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const CallGraphNode * | operator[] (const Function *F) const |
Returns the call graph node for the provided function. | |
CallGraphNode * | operator[] (const Function *F) |
Returns the call graph node for the provided function. | |
CallGraphNode * | getExternalCallingNode () const |
Returns the CallGraphNode which is used to represent undetermined calls into the callgraph. | |
CallGraphNode * | getCallsExternalNode () const |
void | ReplaceExternalCallEdge (CallGraphNode *Old, CallGraphNode *New) |
Old node has been deleted, and New is to be used in its place, update the ExternalCallingNode. | |
Function * | removeFunctionFromModule (CallGraphNode *CGN) |
Unlink the function from this module, returning it. | |
CallGraphNode * | getOrInsertFunction (const Function *F) |
Similar to operator[], but this will insert a new CallGraphNode for F if one does not already exist. | |
void | populateCallGraphNode (CallGraphNode *CGN) |
Populate CGN based on the calls inside the associated function. | |
void | addToCallGraph (Function *F) |
Add a function to the call graph, and link the node to all of the functions that it calls. | |
The basic data container for the call graph of a [Module](classllvm%5F1%5F1Module.html "A Module instance is used to store all the information related to an LLVM 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.
Definition at line 71 of file CallGraph.h.
◆ const_iterator
◆ iterator
CallGraph::CallGraph ( Module & M) | explicit |
---|
◆ CallGraph() [2/2]
◆ ~CallGraph()
CallGraph::~CallGraph | ( | ) |
---|
◆ addToCallGraph()
void CallGraph::addToCallGraph | ( | Function * | F | ) |
---|
◆ begin() [1/2]
iterator llvm::CallGraph::begin ( ) | inline |
---|
◆ begin() [2/2]
◆ dump()
◆ end() [1/2]
iterator llvm::CallGraph::end ( ) | inline |
---|
◆ end() [2/2]
◆ getCallsExternalNode()
CallGraphNode * llvm::CallGraph::getCallsExternalNode ( ) const | inline |
---|
◆ getExternalCallingNode()
CallGraphNode * llvm::CallGraph::getExternalCallingNode ( ) const | inline |
---|
◆ getModule()
Module & llvm::CallGraph::getModule ( ) const | inline |
---|
Returns the module the call graph corresponds to.
Definition at line 100 of file CallGraph.h.
◆ getOrInsertFunction()
◆ invalidate()
◆ operator[]() [1/2]
Returns the call graph node for the provided function.
Definition at line 118 of file CallGraph.h.
References assert(), F, and I.
◆ operator[]() [2/2]
Returns the call graph node for the provided function.
Definition at line 111 of file CallGraph.h.
References assert(), F, and I.
◆ populateCallGraphNode()
◆ print()
◆ removeFunctionFromModule()
◆ ReplaceExternalCallEdge()
Old node has been deleted, and New is to be used in its place, update the ExternalCallingNode.
Definition at line 141 of file CallGraph.cpp.
The documentation for this class was generated from the following files:
- include/llvm/Analysis/CallGraph.h
- lib/Analysis/CallGraph.cpp