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:135

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

Methods

Edge()

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

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

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

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:165

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

Description

Returnss the \c Kind of the edge.

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

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:160

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:155

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:147