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 Types | |
|---|---|
| using | iterator = FunctionMapTy::iterator |
| using | const_iterator = FunctionMapTy::const_iterator |
| Public Member Functions | |
|---|---|
| LLVM_ABI | CallGraph (Module &M) |
| LLVM_ABI | CallGraph (CallGraph &&Arg) |
| LLVM_ABI | ~CallGraph () |
| LLVM_ABI void | print (raw_ostream &OS) const |
| LLVM_ABI void | dump () const |
| Module & | getModule () const |
| Returns the module the call graph corresponds to. | |
| LLVM_ABI 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 |
| LLVM_ABI Function * | removeFunctionFromModule (CallGraphNode *CGN) |
| Unlink the function from this module, returning it. | |
| LLVM_ABI CallGraphNode * | getOrInsertFunction (const Function *F) |
| Similar to operator[], but this will insert a new CallGraphNode for F if one does not already exist. | |
| LLVM_ABI void | populateCallGraphNode (CallGraphNode *CGN) |
| Populate CGN based on the calls inside the associated function. | |
| LLVM_ABI 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 72 of file CallGraph.h.
◆ const_iterator
using llvm::CallGraph::const_iterator = FunctionMapTy::const_iterator
◆ iterator
using llvm::CallGraph::iterator = FunctionMapTy::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]
| const_iterator llvm::CallGraph::begin ( ) const | inline |
|---|
◆ dump()
◆ end() [1/2]
| iterator llvm::CallGraph::end ( ) | inline |
|---|
◆ end() [2/2]
| const_iterator llvm::CallGraph::end ( ) const | inline |
|---|
◆ 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 101 of file CallGraph.h.
◆ getOrInsertFunction()
◆ invalidate()
◆ operator[]() [1/2]
Returns the call graph node for the provided function.
Definition at line 119 of file CallGraph.h.
References assert(), F, and I.
◆ operator[]() [2/2]
Returns the call graph node for the provided function.
Definition at line 112 of file CallGraph.h.
References assert(), F, and I.
◆ populateCallGraphNode()
◆ print()
◆ removeFunctionFromModule()
The documentation for this class was generated from the following files:
- include/llvm/Analysis/CallGraph.h
- lib/Analysis/CallGraph.cpp