Skip to content

DominatorTreesAndDominanceFrontiers::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).

Synopsis

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

class ControlFlowGraph
    : public SimpleDirectedGraph

Base Classes

Name

Description

SimpleDirectedGraph

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

Enums

Name

Description

ID_dir

determines the ordering of id numbers

Member Functions

Name

Description

ControlFlowGraph [constructor]

The constructor for ControlFlowGraph. Builds a CFG rooted at head

createNode

from a given CFGImpl node, create one (or more) ControlNodes

getNode

given a node id (and which numbering scheme to use), return the appropriate control node

getSize

return the number of nodes in the CFG

outputCFGImpl

dump the contents of the original CFGImpl to a dot file

Private Member Functions

Private Data Members

Name

Description

_backIndex

Array matches IDs to ControlNodes using backward ids

_cfg

_cfgnodemap

Map from CFGImpl nodes to our ControlNodes (used for empty CFGNodeImpls)

_entry

_exit

_forIndex

Array matches IDs to ControlNodes using forward ids

_numNodes

_sgnodemap

Map from SgNodes to ControlNodes (used for ControlNodes with statements)

Description

This class extends SimpleDirectedGraph templated on ControlNode

Created with MrDocs