class LazyCallGraph::Edge

Declaration

class LazyCallGraph::Edge { /* full declaration omitted */ };

Description

A class used to represent edges in the call graph. The lazy call graph models both *call* edges and *reference* edges. Call edges are much what you would expect, and exist when there is a 'call' or 'invoke' instruction of some function. Reference edges are also tracked along side these, and exist whenever any instruction (transitively through its operands) references a function. All call edges are inherently reference edges, and so the reference graph forms a superset of the formal call graph. All of these forms of edges are fundamentally represented as outgoing edges. The edges are stored in the source node and point at the target node. This allows the edge structure itself to be a very compact data structure: essentially a tagged pointer.

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:131

Member Variables

private PointerIntPair<llvm::LazyCallGraph::Node*, 1, llvm::LazyCallGraph::Edge::Kind> Value

Method Overview

  • public Edge()
  • public Edge(llvm::LazyCallGraph::Node & N, llvm::LazyCallGraph::Edge::Kind K)
  • public llvm::Function & getFunction() const
  • public llvm::LazyCallGraph::Edge::Kind getKind() const
  • public llvm::LazyCallGraph::Node & getNode() const
  • public bool isCall() const
  • public bool operator bool() const
  • private void setKind(llvm::LazyCallGraph::Edge::Kind K)

Methods

Edge()

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

Edge(llvm::LazyCallGraph::Node& N,
     llvm::LazyCallGraph::Edge::Kind K)

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:137

Parameters

llvm::LazyCallGraph::Node& N
llvm::LazyCallGraph::Edge::Kind K

llvm::Function& getFunction() const

Description

Get the function referenced by this edge. This requires that the edge is not null.

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:161

llvm::LazyCallGraph::Edge::Kind getKind() const

Description

Returns the \c Kind of the edge.

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:146

llvm::LazyCallGraph::Node& getNode() const

Description

Get the call graph node referenced by this edge. This requires that the edge is not null.

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:156

bool isCall() const

Description

Test whether the edge represents a direct call to a function. This requires that the edge is not null.

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:151

bool operator bool() const

Description

Test whether the edge is null. This happens when an edge has been deleted. We leave the edge objects around but clear them.

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:143

void setKind(llvm::LazyCallGraph::Edge::Kind K)

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:169

Parameters

llvm::LazyCallGraph::Edge::Kind K