MLIR
20.0.0git
|
This class represents a single callable in the callgraph. More...
#include "mlir/Analysis/CallGraph.h"
Classes | |
class | Edge |
This class represents a directed edge between two nodes in the callgraph. More... | |
Public Types | |
using | iterator = SmallVectorImpl< Edge >::const_iterator |
Iterator over the outgoing edges of this node. More... | |
Public Member Functions | |
bool | isExternal () const |
Returns true if this node is an external node. More... | |
Region * | getCallableRegion () const |
Returns the callable region this node represents. More... | |
void | addAbstractEdge (CallGraphNode *node) |
Adds an abstract reference edge to the given node. More... | |
void | addCallEdge (CallGraphNode *node) |
Add an outgoing call edge from this node. More... | |
void | addChildEdge (CallGraphNode *child) |
Adds a reference edge to the given child node. More... | |
iterator | begin () const |
iterator | end () const |
bool | hasChildren () const |
Returns true if this node has any child edges. More... | |
Friends | |
class | CallGraph |
This class represents a single callable in the callgraph.
Aside from the external node, each node represents a callable node in the graph and contains a valid corresponding Region. The external node is a virtual node used to represent external edges into, and out of, the callgraph.
Definition at line 40 of file CallGraph.h.
using mlir::CallGraphNode::iterator = SmallVectorImpl<Edge>::const_iterator |
Iterator over the outgoing edges of this node.
Definition at line 110 of file CallGraph.h.
void CallGraphNode::addAbstractEdge | ( | CallGraphNode * | node | ) |
Adds an abstract reference edge to the given node.
Adds an reference edge to the given node.
An abstract edge does not come from any observable operations, so this is only valid on the external node.
This is only valid on the external node.
Definition at line 43 of file CallGraph.cpp.
References isExternal().
Referenced by mlir::CallGraph::getOrAddNode().
void CallGraphNode::addCallEdge | ( | CallGraphNode * | node | ) |
Add an outgoing call edge from this node.
Definition at line 49 of file CallGraph.cpp.
Referenced by computeCallGraph().
void CallGraphNode::addChildEdge | ( | CallGraphNode * | child | ) |
Adds a reference edge to the given child node.
Definition at line 54 of file CallGraph.cpp.
Referenced by mlir::CallGraph::getOrAddNode().
|
inline |
Definition at line 111 of file CallGraph.h.
Referenced by llvm::GraphTraits< const mlir::CallGraphNode * >::child_begin().
|
inline |
Definition at line 112 of file CallGraph.h.
Referenced by llvm::GraphTraits< const mlir::CallGraphNode * >::child_end().
Region * CallGraphNode::getCallableRegion | ( | ) | const |
Returns the callable region this node represents.
Return the callable region this node represents.
This can only be called on non-external nodes.
Definition at line 36 of file CallGraph.cpp.
References isExternal().
Referenced by mlir::CallGraph::eraseNode(), isProfitableToInline(), and mlir::CallGraph::print().
bool CallGraphNode::hasChildren | ( | ) | const |
Returns true if this node has any child edges.
Definition at line 59 of file CallGraph.cpp.
References mlir::CallGraphNode::Edge::isChild().
Referenced by mlir::CallGraph::eraseNode().
bool CallGraphNode::isExternal | ( | ) | const |
Returns true if this node is an external node.
Returns true if this node refers to the indirect/external node.
Definition at line 32 of file CallGraph.cpp.
Referenced by addAbstractEdge(), collectCallOps(), and getCallableRegion().
Definition at line 147 of file CallGraph.h.