LLVM API Documentation

llvm::CallGraphNode Class Reference

#include <CallGraph.h>

Collaboration diagram for llvm::CallGraphNode:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< CallRecord
>::iterator 
iterator
typedef std::vector< CallRecord
>::const_iterator 
const_iterator

Public Member Functions

FunctiongetFunction () const
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
unsigned size () const
CallGraphNodeoperator[] (unsigned i) const
void dump () const
void print (std::ostream &OS) const
void removeAllCalledFunctions ()
void addCalledFunction (CallSite CS, CallGraphNode *M)
void removeCallEdgeTo (CallGraphNode *Callee)
void removeAnyCallEdgeTo (CallGraphNode *Callee)
 CallGraphNode (Function *f)

Friends

class CallGraph

Detailed Description

Definition at line 169 of file CallGraph.h.


Member Typedef Documentation

typedef std::vector<CallRecord>::iterator llvm::CallGraphNode::iterator

Definition at line 180 of file CallGraph.h.

typedef std::vector<CallRecord>::const_iterator llvm::CallGraphNode::const_iterator

Definition at line 181 of file CallGraph.h.


Constructor & Destructor Documentation

llvm::CallGraphNode::CallGraphNode ( Function f  )  [inline]

Definition at line 233 of file CallGraph.h.


Member Function Documentation

Function* llvm::CallGraphNode::getFunction (  )  const [inline]

Definition at line 184 of file CallGraph.h.

Referenced by print(), and llvm::CallGraph::removeFunctionFromModule().

iterator llvm::CallGraphNode::begin (  )  [inline]

Definition at line 186 of file CallGraph.h.

Referenced by llvm::GraphTraits< const CallGraphNode * >::child_begin(), llvm::GraphTraits< CallGraphNode * >::child_begin(), InlineCallIfPossible(), print(), and UpdateCallGraphAfterInlining().

iterator llvm::CallGraphNode::end (  )  [inline]

Definition at line 187 of file CallGraph.h.

Referenced by llvm::GraphTraits< const CallGraphNode * >::child_end(), llvm::GraphTraits< CallGraphNode * >::child_end(), InlineCallIfPossible(), print(), and UpdateCallGraphAfterInlining().

const_iterator llvm::CallGraphNode::begin (  )  const [inline]

Definition at line 188 of file CallGraph.h.

const_iterator llvm::CallGraphNode::end (  )  const [inline]

Definition at line 189 of file CallGraph.h.

unsigned llvm::CallGraphNode::size (  )  const [inline]

Definition at line 190 of file CallGraph.h.

CallGraphNode* llvm::CallGraphNode::operator[] ( unsigned  i  )  const [inline]

Definition at line 194 of file CallGraph.h.

void CallGraphNode::dump (  )  const

dump - Print out this call graph node.

Definition at line 273 of file CallGraph.cpp.

References print().

void CallGraphNode::print ( std::ostream &  OS  )  const

Definition at line 259 of file CallGraph.cpp.

References begin(), E, end(), getFunction(), and llvm::Value::getName().

Referenced by dump().

void llvm::CallGraphNode::removeAllCalledFunctions (  )  [inline]

removeAllCalledFunctions - As the name implies, this removes all edges from this CallGraphNode to any functions it calls.

Definition at line 210 of file CallGraph.h.

void llvm::CallGraphNode::addCalledFunction ( CallSite  CS,
CallGraphNode M 
) [inline]

addCalledFunction add a function to the list of functions called by this one.

Definition at line 216 of file CallGraph.h.

References M.

Referenced by llvm::InlineFunction(), and UpdateCallGraphAfterInlining().

void CallGraphNode::removeCallEdgeTo ( CallGraphNode Callee  ) 

removeCallEdgeTo - This method removes a *single* edge to the specified callee function. Note that this method takes linear time, so it should be used sparingly.

Definition at line 275 of file CallGraph.cpp.

References second.

Referenced by InlineCallIfPossible(), and UpdateCallGraphAfterInlining().

void CallGraphNode::removeAnyCallEdgeTo ( CallGraphNode Callee  ) 

removeAnyCallEdgeTo - This method removes any 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.

Definition at line 288 of file CallGraph.cpp.

References second.

Referenced by llvm::Inliner::doFinalization().


Friends And Related Function Documentation

friend class CallGraph [friend]

Definition at line 230 of file CallGraph.h.


The documentation for this class was generated from the following files: