LLVM API Documentation
#include <CallGraph.h>
Inheritance diagram for llvm::CallGraph:
Public Types | |
typedef FunctionMapTy::iterator | iterator |
typedef FunctionMapTy::const_iterator | const_iterator |
Public Member Functions | |
CallGraphNode * | getExternalCallingNode () const |
CallGraphNode * | getCallsExternalNode () const |
CallGraphNode * | getRoot () |
const CallGraphNode * | getRoot () const |
Module & | getModule () const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const CallGraphNode * | operator[] (const Function *F) const |
CallGraphNode * | operator[] (const Function *F) |
Function * | removeFunctionFromModule (CallGraphNode *CGN) |
Function * | removeFunctionFromModule (Function *F) |
void | changeFunction (Function *OldF, Function *NewF) |
CallGraph () | |
~CallGraph () | |
virtual bool | runOnModule (Module &M) |
virtual void | getAnalysisUsage (AnalysisUsage &AU) const |
virtual void | releaseMemory () |
void | print (std::ostream &o, const Module *M) const |
void | dump () const |
Static Public Member Functions | |
static void | stub () |
Definition at line 67 of file CallGraph.h.
|
Definition at line 91 of file CallGraph.h. |
|
Definition at line 90 of file CallGraph.h. |
|
Definition at line 150 of file CallGraph.h. |
|
Definition at line 151 of file CallGraph.h. |
|
Definition at line 108 of file CallGraph.h. |
|
Definition at line 106 of file CallGraph.h. Referenced by llvm::Inliner::doFinalization(), llvm::GraphTraits< const CallGraph * >::nodes_begin(), llvm::GraphTraits< CallGraph * >::nodes_begin(), and print(). |
|
changeFunction - This method changes the function associated with this CallGraphNode, for use by transformations that need to change the prototype of a Function (thus they must create a new Function and move the old code over). Definition at line 186 of file CallGraph.cpp. References llvm::CallGraphNode::F. |
|
dump - Print out this call graph. Reimplemented from llvm::Pass. Definition at line 156 of file CallGraph.cpp. References print(). |
|
Definition at line 109 of file CallGraph.h. |
|
Definition at line 107 of file CallGraph.h. Referenced by llvm::Inliner::doFinalization(), llvm::GraphTraits< const CallGraph * >::nodes_end(), llvm::GraphTraits< CallGraph * >::nodes_end(), and print(). |
|
getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. If a pass specifies that it uses a particular analysis result to this function, it can then use the getAnalysis<AnalysisType>() function, below. Reimplemented from llvm::Pass. Definition at line 157 of file CallGraph.h. References llvm::AnalysisUsage::setPreservesAll(). |
|
Definition at line 94 of file CallGraph.h. |
|
Definition at line 93 of file CallGraph.h. Referenced by llvm::Inliner::doFinalization(), llvm::GraphTraits< const CallGraph * >::getEntryNode(), and llvm::GraphTraits< CallGraph * >::getEntryNode(). |
|
getModule - Return the module the call graph corresponds to. Definition at line 104 of file CallGraph.h. |
|
Definition at line 100 of file CallGraph.h. |
|
Definition at line 99 of file CallGraph.h. Referenced by print(). |
|
Definition at line 119 of file CallGraph.h. References I. |
|
Definition at line 114 of file CallGraph.h. References I. |
|
Print the types found in the module. If the optional Module parameter is passed in, then the types are printed symbolically if possible, using the symbol table from the module. Reimplemented from llvm::Pass. Definition at line 145 of file CallGraph.cpp. References begin(), E, end(), getRoot(), and llvm::CallGraphNode::print(). Referenced by dump(). |
|
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused. Optionally implement this function to release pass memory when it is no longer used. Reimplemented from llvm::Pass. Definition at line 162 of file CallGraph.h. |
|
Definition at line 137 of file CallGraph.h. References removeFunctionFromModule(). |
|
removeFunctionFromModule - 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. Definition at line 171 of file CallGraph.cpp. References llvm::CallGraphNode::CalledFunctions, llvm::CallGraphNode::getFunction(), and llvm::Module::getFunctionList(). Referenced by llvm::Inliner::doFinalization(), InlineCallIfPossible(), and removeFunctionFromModule(). |
|
runOnModule - Virtual method overriden by subclasses to process the module being operated on. Implements llvm::ModulePass. Definition at line 102 of file CallGraph.cpp. References llvm::Module::begin(), E, and llvm::Module::end(). |
|
Definition at line 197 of file CallGraph.cpp. |