MLIR  16.0.0git
mlir::CallGraphNode Class Reference

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...

RegiongetCallableRegion () const
Returns the callable region this node represents. More...

Adds an abstract reference edge to the given node. More...

Add an outgoing call edge from this node. More...

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...

class CallGraph

Detailed Description

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.

◆ iterator

 using mlir::CallGraphNode::iterator = SmallVectorImpl::const_iterator

Iterator over the outgoing edges of this node.

Definition at line 110 of file CallGraph.h.

Member Function Documentation

 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 39 of file CallGraph.cpp.

References isExternal().

 void CallGraphNode::addCallEdge ( CallGraphNode * node )

Add an outgoing call edge from this node.

Definition at line 45 of file CallGraph.cpp.

Referenced by computeCallGraph().

 void CallGraphNode::addChildEdge ( CallGraphNode * child )

Adds a reference edge to the given child node.

Definition at line 50 of file CallGraph.cpp.

◆ begin()

 iterator mlir::CallGraphNode::begin ( ) const
inline

Definition at line 111 of file CallGraph.h.

◆ end()

 iterator mlir::CallGraphNode::end ( ) const
inline

Definition at line 112 of file CallGraph.h.

References hasChildren().

◆ getCallableRegion()

 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 32 of file CallGraph.cpp.

References isExternal().

◆ hasChildren()

 bool CallGraphNode::hasChildren ( ) const

Returns true if this node has any child edges.

Definition at line 55 of file CallGraph.cpp.

References mlir::CallGraphNode::Edge::isChild().

Referenced by end(), mlir::CallGraph::eraseNode(), and inlineCallsInSCC().

◆ isExternal()

 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 28 of file CallGraph.cpp.

◆ CallGraph

 friend class CallGraph
friend

Definition at line 147 of file CallGraph.h.

The documentation for this class was generated from the following files: