class CallGraphNode

Declaration

class CallGraphNode { /* full declaration omitted */ };

Description

A node in the call graph for a module. Typically represents a function in the call graph. There are also special "null" nodes used to represent theoretical entries in the call graph.

Declared at: llvm/include/llvm/Analysis/CallGraph.h:164

Method Overview

Methods

CallGraphNode(const llvm::CallGraphNode&)

Declared at: llvm/include/llvm/Analysis/CallGraph.h:176

Parameters

const llvm::CallGraphNode&

inline CallGraphNode(llvm::Function* F)

Description

Creates a node for the specified function.

Declared at: llvm/include/llvm/Analysis/CallGraph.h:174

Parameters

llvm::Function* F

void addCalledFunction(llvm::CallBase* Call,
                       llvm::CallGraphNode* M)

Description

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

Declared at: llvm/include/llvm/Analysis/CallGraph.h:232

Parameters

llvm::CallBase* Call
llvm::CallGraphNode* M

inline llvm::CallGraphNode::iterator begin()

Declared at: llvm/include/llvm/Analysis/CallGraph.h:189

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

Declared at: llvm/include/llvm/Analysis/CallGraph.h:191

void dump() const

Description

Print out this call graph node.

Declared at: llvm/include/llvm/Analysis/CallGraph.h:207

inline bool empty() const

Declared at: llvm/include/llvm/Analysis/CallGraph.h:193

inline llvm::CallGraphNode::iterator end()

Declared at: llvm/include/llvm/Analysis/CallGraph.h:190

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

Declared at: llvm/include/llvm/Analysis/CallGraph.h:192

llvm::Function* getFunction() const

Description

Returns the function that this call graph node represents.

Declared at: llvm/include/llvm/Analysis/CallGraph.h:187

unsigned int getNumReferences() const

Description

Returns the number of other CallGraphNodes in this CallGraph that reference this node in their callee list.

Declared at: llvm/include/llvm/Analysis/CallGraph.h:198

void print(llvm::raw_ostream& OS) const

Declared at: llvm/include/llvm/Analysis/CallGraph.h:208

Parameters

llvm::raw_ostream& OS

void removeAllCalledFunctions()

Description

Removes all edges from this CallGraphNode to any functions it calls.

Declared at: llvm/include/llvm/Analysis/CallGraph.h:217

void removeAnyCallEdgeTo(
    llvm::CallGraphNode* Callee)

Description

Removes all 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.

Declared at: llvm/include/llvm/Analysis/CallGraph.h:256

Parameters

llvm::CallGraphNode* Callee

void removeCallEdge(
    llvm::CallGraphNode::iterator I)

Declared at: llvm/include/llvm/Analysis/CallGraph.h:240

Parameters

llvm::CallGraphNode::iterator I

void removeCallEdgeFor(llvm::CallBase& Call)

Description

Removes the edge in the node for the specified call site. Note that this method takes linear time, so it should be used sparingly.

Declared at: llvm/include/llvm/Analysis/CallGraph.h:249

Parameters

llvm::CallBase& Call

void removeOneAbstractEdgeTo(
    llvm::CallGraphNode* Callee)

Description

Removes one edge associated with a null callsite from this node to the specified callee function.

Declared at: llvm/include/llvm/Analysis/CallGraph.h:260

Parameters

llvm::CallGraphNode* Callee

void replaceCallEdge(llvm::CallBase& Call,
                     llvm::CallBase& NewCall,
                     llvm::CallGraphNode* NewNode)

Description

Replaces the edge in the node for the specified call site with a new one. Note that this method takes linear time, so it should be used sparingly.

Declared at: llvm/include/llvm/Analysis/CallGraph.h:266

Parameters

llvm::CallBase& Call
llvm::CallBase& NewCall
llvm::CallGraphNode* NewNode

inline unsigned int size() const

Declared at: llvm/include/llvm/Analysis/CallGraph.h:194

void stealCalledFunctionsFrom(
    llvm::CallGraphNode* N)

Description

Moves all the callee information from N to this node.

Declared at: llvm/include/llvm/Analysis/CallGraph.h:225

Parameters

llvm::CallGraphNode* N

~CallGraphNode()

Declared at: llvm/include/llvm/Analysis/CallGraph.h:179