Skip to content

SimpleDirectedGraph

This provides some simple support mechanisms to create a graph of SimpleDirectedGraphNodes.

Synopsis

Declared in <src/midend/programAnalysis/staticInterproceduralSlicing/SimpleDirectedGraph.h>

Enums

Name

Description

TraverseDirection

This enum determines which direction to travel during a reachability pass.

Member Functions

Name

Description

SimpleDirectedGraph [constructor]

Default constructor

~SimpleDirectedGraph [destructor] [virtual]

Destructor

addLink [virtual]

Add a link to the graph between "from" and to "to"

addNode [virtual]

Add a node to the graph

getNodes

get all the nodes in the graph

getReachable

linkExists

Check if a dependence is in the graph

nodeExists

Check if a node containing data is in the graph

printGraph

removeLink [virtual]

Remove a linkt between "from" and "to"

removeNode [virtual]

writeDot [virtual]

Protected Member Functions

Name

Description

_displayData [virtual]

This virtual function can be overriden to control how data is presented by printGraph(). It defaults to simply outputting the data onto os.

Protected Data Members

Name

_nodes

Derived Classes

Name

Description

ControlFlowGraph

This class constructs a control flow graph for a given function definition. It builds off of information provided by CFGImpl.h, and adds some additional bookkeeping information (such as entry and exit points, as well as having a separate node for each statement in the graph).

DependenceGraph

Created with MrDocs