class LazyCallGraph::Node
Declaration
class LazyCallGraph::Node { /* full declaration omitted */ };
Description
A node in the call graph. This represents a single node. It's primary roles are to cache the list of callees, de-duplicate and provide fast testing of whether a function is a callee, and facilitate iteration of child nodes in the graph. The node works much like an optional in order to lazily populate the edges of each node. Until populated, there are no edges. Once populated, you can access the edges by dereferencing the node or using the `->` operator as if the node was an `Optional <EdgeSequence >`.
Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:327
Method Overview
- public llvm::Function & getFunction() const
- public llvm::LazyCallGraph & getGraph() const
- public llvm::StringRef getName() const
- public bool isDead() const
- public bool isPopulated() const
- public llvm::LazyCallGraph::EdgeSequence & populate()
Methods
¶llvm::Function& getFunction() const
llvm::Function& getFunction() const
Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:334
¶llvm::LazyCallGraph& getGraph() const
llvm::LazyCallGraph& getGraph() const
Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:332
¶llvm::StringRef getName() const
llvm::StringRef getName() const
Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:336
¶bool isDead() const
bool isDead() const
Description
Tests whether this is actually a dead node and no longer valid. Users rarely interact with nodes in this state and other methods are invalid. This is used to model a node in an edge list where the function has been completely removed.
Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:350
¶bool isPopulated() const
bool isPopulated() const
Description
Tests whether the node has been populated with edges.
Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:343
¶llvm::LazyCallGraph::EdgeSequence& populate()
llvm::LazyCallGraph::EdgeSequence& populate()
Description
Populate the edges of this node if necessary. The first time this is called it will populate the edges for this node in the graph. It does this by scanning the underlying function, so once this is done, any changes to that function must be explicitly reflected in updates to the graph. This will not update or re-scan anything if called repeatedly. Instead, the edge sequence is cached and returned immediately on subsequent calls.
Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:376
Returns
the populated \c EdgeSequence to simplify walking it.