class CallGraph

Declaration

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

Description

The basic data container for the call graph of a \c 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.

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

Method Overview

Methods

CallGraph(llvm::Module& M)

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

Parameters

llvm::Module& M

CallGraph(llvm::CallGraph&& Arg)

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

Parameters

llvm::CallGraph&& Arg

inline llvm::CallGraph::iterator begin()

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

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

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

void dump() const

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

inline llvm::CallGraph::iterator end()

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

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

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

llvm::CallGraphNode* getCallsExternalNode() const

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

llvm::CallGraphNode* getExternalCallingNode()
    const

Description

Returns the \c CallGraphNode which is used to represent undetermined calls into the callgraph.

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

llvm::Module& getModule() const

Description

Returns the module the call graph corresponds to.

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

llvm::CallGraphNode* getOrInsertFunction(
    const llvm::Function* F)

Description

Similar to operator[], but this will insert a new CallGraphNode for\c F if one does not already exist.

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

Parameters

const llvm::Function* F

void print(llvm::raw_ostream& OS) const

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

Parameters

llvm::raw_ostream& OS

llvm::Function* removeFunctionFromModule(
    llvm::CallGraphNode* CGN)

Description

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.

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

Parameters

llvm::CallGraphNode* CGN

~CallGraph()

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