#include <CFG.hpp>


Classes | |
| class | NodeLabel |
| class | NodeLabelListIterator |
Public Types | |
| typedef std::list< NodeLabel > | NodeLabelList |
Public Member Functions | |
| CFG () | |
| ~CFG () | |
| Constructs an empty standard CFGStandard. | |
| OA_ptr< NodeInterface > | getEntry () const |
| get ptr to unique entry node | |
| OA_ptr< NodeInterface > | getExit () const |
| pointer to entry node | |
| SymHandle | getName () const |
| get SymHandle for ProcHandle (i.e., function name) | |
| void | dump (std::ostream &, OA_ptr< IRHandlesIRInterface >) |
| void | dumpdot (std::ostream &os, OA_ptr< IRHandlesIRInterface > ir) |
| OA_ptr< NodesIteratorInterface > | getCFGNodesIterator () const |
| OA_ptr< EdgesIteratorInterface > | getCFGEdgesIterator () const |
| OA_ptr< NodesIteratorInterface > | getCFGEntryNodesIterator () const |
| OA_ptr< NodesIteratorInterface > | getCFGExitNodesIterator () const |
| OA_ptr< NodesIteratorInterface > | getCFGReversePostDFSIterator (DGraph::DGraphEdgeDirection pOrient) |
| OA_ptr< NodesIteratorInterface > | getCFGDFSIterator (OA_ptr< NodeInterface > n) |
| void | setEntry (OA_ptr< Node > n) |
| void | setExit (OA_ptr< Node > n) |
| OA_ptr< Node > | splitBlock (OA_ptr< Node >, StmtHandle) |
| Split the basic block 'block' at the given split point and return the new basic block. | |
| OA_ptr< Edge > | connect (OA_ptr< NodeInterface > src, OA_ptr< NodeInterface > dst, EdgeType type) |
| OA_ptr< Edge > | connect (OA_ptr< NodeInterface > src, OA_ptr< NodeInterface > dst, EdgeType type, ExprHandle expr) |
| void | connect (OA_ptr< NodeInterface >, NodeLabelList &) |
| Connect the src to each of the nodes in dst_list. | |
| void | connect (NodeLabelList &, OA_ptr< NodeInterface >) |
| Connect each node in src_list to dst. | |
| void | disconnect (OA_ptr< EdgeInterface > e) |
| void | disconnect (OA_ptr< NodeInterface > n) |
| OA_ptr< Node > | node_from_label (OA::StmtLabel) |
| Given a label, determine whether it has been encountered already. If so, return its associated block (obtained from the mlabel_to_node_map). If not, create a new block and update the mlabel_to_node_map. | |
| OA_ptr< Node > | getLabelBlock (StmtLabel lab) |
| Edge constructor. | |
| void | mapLabelToNode (OA::StmtLabel lab, OA_ptr< Node > n) |
| associate given label with given node | |
| bool | isLabelMappedToNode (StmtLabel lab) |
| determine if the given label is currently mapped to a node | |
Private Attributes | |
| SymHandle | mName |
| OA_ptr< Node > | mEntry |
| OA_ptr< Node > | mExit |
| std::map< OA::StmtLabel, OA_ptr< Node > > | mlabel_to_node_map |
Friends | |
| class | NodeLabelListIterator |
Definition at line 349 of file CFG.hpp.
| typedef std::list<NodeLabel> OA::CFG::CFG::NodeLabelList |
| OA::CFG::CFG::~CFG | ( | ) |
| void OA::CFG::CFG::connect | ( | CFG::NodeLabelList & | src_list, | |
| OA_ptr< NodeInterface > | dst | |||
| ) |
Connect each node in src_list to dst.
Definition at line 900 of file CFG.cpp.
References connect(), OA::CFG::CFG::NodeLabelListIterator::current(), OA::CFG::CFG::NodeLabel::getEdgeType(), OA::CFG::CFG::NodeLabel::getExpr(), OA::CFG::CFG::NodeLabel::getNode(), and OA::CFG::CFG::NodeLabelListIterator::isValid().

| void OA::CFG::CFG::connect | ( | OA_ptr< NodeInterface > | src, | |
| CFG::NodeLabelList & | dst_list | |||
| ) |
Connect the src to each of the nodes in dst_list.
Definition at line 886 of file CFG.cpp.
References connect(), OA::CFG::CFG::NodeLabelListIterator::current(), OA::CFG::CFG::NodeLabel::getEdgeType(), OA::CFG::CFG::NodeLabel::getExpr(), OA::CFG::CFG::NodeLabel::getNode(), and OA::CFG::CFG::NodeLabelListIterator::isValid().

| OA_ptr< Edge > OA::CFG::CFG::connect | ( | OA_ptr< NodeInterface > | src, | |
| OA_ptr< NodeInterface > | dst, | |||
| EdgeType | type, | |||
| ExprHandle | expr | |||
| ) |
Definition at line 549 of file CFG.cpp.
References OA::DGraph::DGraphImplement::addEdge().

| OA_ptr< Edge > OA::CFG::CFG::connect | ( | OA_ptr< NodeInterface > | src, | |
| OA_ptr< NodeInterface > | dst, | |||
| EdgeType | type | |||
| ) |
Definition at line 539 of file CFG.cpp.
References OA::DGraph::DGraphImplement::addEdge().
Referenced by connect(), and splitBlock().

| void OA::CFG::CFG::disconnect | ( | OA_ptr< NodeInterface > | n | ) |
Definition at line 564 of file CFG.cpp.
References OA::DGraph::DGraphImplement::removeNode().

| void OA::CFG::CFG::disconnect | ( | OA_ptr< EdgeInterface > | e | ) |
Definition at line 559 of file CFG.cpp.
References OA::DGraph::DGraphImplement::removeEdge().
Referenced by splitBlock().

| void OA::CFG::CFG::dump | ( | std::ostream & | , | |
| OA_ptr< IRHandlesIRInterface > | ||||
| ) |
| void OA::CFG::CFG::dumpdot | ( | std::ostream & | os, | |
| OA_ptr< IRHandlesIRInterface > | ir | |||
| ) |
| OA_ptr< NodesIteratorInterface > OA::CFG::CFG::getCFGDFSIterator | ( | OA_ptr< NodeInterface > | n | ) | [virtual] |
Implements OA::CFG::CFGInterface.
Definition at line 501 of file CFG.cpp.
References OA::DGraph::DGraphImplement::getDFSIterator().

| OA_ptr< EdgesIteratorInterface > OA::CFG::CFG::getCFGEdgesIterator | ( | ) | const [virtual] |
Implements OA::CFG::CFGInterface.
Definition at line 470 of file CFG.cpp.
References OA::DGraph::DGraphImplement::getEdgesIterator().

| OA_ptr< NodesIteratorInterface > OA::CFG::CFG::getCFGEntryNodesIterator | ( | ) | const [virtual] |
Implements OA::CFG::CFGInterface.
Definition at line 478 of file CFG.cpp.
References OA::DGraph::DGraphImplement::getEntryNodesIterator().

| OA_ptr< NodesIteratorInterface > OA::CFG::CFG::getCFGExitNodesIterator | ( | ) | const [virtual] |
Implements OA::CFG::CFGInterface.
Definition at line 485 of file CFG.cpp.
References OA::DGraph::DGraphImplement::getExitNodesIterator().

| OA_ptr< NodesIteratorInterface > OA::CFG::CFG::getCFGNodesIterator | ( | ) | const [virtual] |
DGraph Iterators
CFG Specific Iterators
Implements OA::CFG::CFGInterface.
Definition at line 462 of file CFG.cpp.
References OA::DGraph::DGraphImplement::getNodesIterator().

| OA_ptr< NodesIteratorInterface > OA::CFG::CFG::getCFGReversePostDFSIterator | ( | DGraph::DGraphEdgeDirection | pOrient | ) | [virtual] |
Implements OA::CFG::CFGInterface.
Definition at line 493 of file CFG.cpp.
References OA::DGraph::DGraphImplement::getReversePostDFSIterator().

| OA_ptr< NodeInterface > OA::CFG::CFG::getEntry | ( | ) | const [virtual] |
get ptr to unique entry node
Implements OA::CFG::CFGInterface.
Definition at line 410 of file CFG.cpp.
References mEntry.
| OA_ptr< NodeInterface > OA::CFG::CFG::getExit | ( | ) | const [virtual] |
pointer to entry node
Implements OA::CFG::CFGInterface.
Definition at line 415 of file CFG.cpp.
References mExit.
| OA_ptr< Node > OA::CFG::CFG::getLabelBlock | ( | OA::StmtLabel | lab | ) |
Edge constructor.
Given a label, determine whether it has been encountered already. If so, return its associated block (obtained from the mlabel_to_node_map). If not, return 0
Definition at line 758 of file CFG.cpp.
References mlabel_to_node_map.
| SymHandle OA::CFG::CFG::getName | ( | ) | const [virtual] |
get SymHandle for ProcHandle (i.e., function name)
Implements OA::CFG::CFGInterface.
Definition at line 420 of file CFG.cpp.
References mName.
| bool OA::CFG::CFG::isLabelMappedToNode | ( | StmtLabel | lab | ) |
determine if the given label is currently mapped to a node
Definition at line 576 of file CFG.cpp.
References mlabel_to_node_map.
| void OA::CFG::CFG::mapLabelToNode | ( | OA::StmtLabel | lab, | |
| OA_ptr< Node > | n | |||
| ) |
associate given label with given node
Definition at line 569 of file CFG.cpp.
References mlabel_to_node_map.
| OA_ptr< Node > OA::CFG::CFG::node_from_label | ( | OA::StmtLabel | lab | ) |
Given a label, determine whether it has been encountered already. If so, return its associated block (obtained from the mlabel_to_node_map). If not, create a new block and update the mlabel_to_node_map.
Definition at line 774 of file CFG.cpp.
References OA::DGraph::DGraphImplement::addNode(), and mlabel_to_node_map.

| OA_ptr< Node > OA::CFG::CFG::splitBlock | ( | OA_ptr< Node > | block, | |
| StmtHandle | splitPoint | |||
| ) |
Split the basic block 'block' at the given split point and return the new basic block.
| splitPoint | The first statement in the new basic block. |
Definition at line 831 of file CFG.cpp.
References OA::DGraph::DGraphImplement::addNode(), connect(), and disconnect().

friend class NodeLabelListIterator [friend] |
OA_ptr<Node> OA::CFG::CFG::mEntry [private] |
OA_ptr<Node> OA::CFG::CFG::mExit [private] |
std::map<OA::StmtLabel, OA_ptr<Node> > OA::CFG::CFG::mlabel_to_node_map [private] |
Definition at line 497 of file CFG.hpp.
Referenced by getLabelBlock(), isLabelMappedToNode(), mapLabelToNode(), node_from_label(), and ~CFG().
SymHandle OA::CFG::CFG::mName [private] |
1.5.7.1