LLVM
8.0.1
|
A class used to represent edges in the call graph. More...
#include "llvm/Analysis/LazyCallGraph.h"
Public Types | |
enum | Kind : bool { Ref = false, Call = true } |
The kind of edge in the graph. More... | |
Public Member Functions | |
Edge () | |
Edge (Node &N, Kind K) | |
operator bool () const | |
Test whether the edge is null. More... | |
Kind | getKind () const |
Returnss the Kind of the edge. More... | |
bool | isCall () const |
Test whether the edge represents a direct call to a function. More... | |
Node & | getNode () const |
Get the call graph node referenced by this edge. More... | |
Function & | getFunction () const |
Get the function referenced by this edge. More... | |
Friends | |
class | LazyCallGraph::EdgeSequence |
class | LazyCallGraph::RefSCC |
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.
Definition at line 135 of file LazyCallGraph.h.
|
inline |
Definition at line 1196 of file LazyCallGraph.h.
Definition at line 1197 of file LazyCallGraph.h.
|
inline |
Get the function referenced by this edge.
This requires that the edge is not null.
Definition at line 1218 of file LazyCallGraph.h.
References assert(), llvm::LazyCallGraph::Node::getFunction(), and getNode().
|
inline |
Returnss the Kind
of the edge.
Definition at line 1203 of file LazyCallGraph.h.
References assert(), and llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getInt().
Referenced by isCall().
|
inline |
Get the call graph node referenced by this edge.
This requires that the edge is not null.
Definition at line 1213 of file LazyCallGraph.h.
References assert(), and llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer().
Referenced by llvm::LazyCallGraph::buildRefSCCs(), and getFunction().
|
inline |
Test whether the edge represents a direct call to a function.
This requires that the edge is not null.
Definition at line 1208 of file LazyCallGraph.h.
References assert(), Call, and getKind().
Referenced by llvm::LazyCallGraph::RefSCC::insertTrivialCallEdge().
|
inlineexplicit |
Test whether the edge is null.
This happens when an edge has been deleted. We leave the edge objects around but clear them.
Definition at line 1199 of file LazyCallGraph.h.
References llvm::PointerIntPair< PointerTy, IntBits, IntType, PtrTraits, Info >::getPointer().
|
friend |
Definition at line 168 of file LazyCallGraph.h.
|
friend |
Definition at line 169 of file LazyCallGraph.h.