#include <newCDG.h>
Definition at line 42 of file newCDG.h.
The data structure holding the dominance frontiers for all nodes in a CFG.
Note that the control dependence information is all included. Each node is mapped to its all control dependent nodes. It is possible that a node is control dependent on another node in different conditions (switch case), so there is a vector of CFG edges for each control dependence.
Definition at line 106 of file newCDG.h.
SDG::ControlDependenceGraph::ControlDependenceGraph |
( |
) | |
|
|
inline |
The default constructor.
Definition at line 69 of file newCDG.h.
SDG::ControlDependenceGraph::ControlDependenceGraph |
( |
const ControlFlowGraph & |
cfg) | |
|
|
inline |
The constructor building the CDG from a CFG.
Definition at line 72 of file newCDG.h.
Build the CDG from the given CFG.
Given a CFG node, return all its control dependences.
Given a AST node, return all its control dependences.
Vertex SDG::ControlDependenceGraph::getCDGVertex |
( |
SgNode * |
astNode) | |
|
Given an AST node, return its corresponding CDG node.
Note that it is possile that there are several CDG nodes containing the same AST node, in which case we just return one of them, since they have the same control dependence.
void SDG::ControlDependenceGraph::toDot |
( |
const std::string & |
filename) | |
const |
Write the CDG to a dot file.
static void SDG::ControlDependenceGraph::writeGraphEdge |
( |
std::ostream & |
out, |
|
|
const CDGEdge & |
edge |
|
) |
| |
|
static |
This function helps to write the DOT file for edges.
It's a static function which can be used by other classes (PDG for example).
Check if the CFG contains any cycle without exit. If there is such a cycle, return false.
void SDG::ControlDependenceGraph::writeGraphNode |
( |
std::ostream & |
out, |
|
|
const Vertex & |
node |
|
) |
| const |
|
inlineprotected |
void SDG::ControlDependenceGraph::writeGraphEdge |
( |
std::ostream & |
out, |
|
|
const Edge & |
edge |
|
) |
| const |
|
inlineprotected |
This function helps to write the DOT file for edges.
Definition at line 118 of file newCDG.h.
void SDG::ControlDependenceGraph::appendSuccessors |
( |
Vertex |
v, |
|
|
std::vector< Vertex > & |
vertices, |
|
|
const std::map< Vertex, std::set< Vertex > > & |
iSucc |
|
) |
| |
|
protected |
A function help to find all successors for the given node in the CFG.
Build dominance frontiers for all nodes in the given CFG.
The documentation for this class was generated from the following file: