OA::CFG::CFG Class Reference

#include <CFG.hpp>

Inheritance diagram for OA::CFG::CFG:

Inheritance graph
[legend]
Collaboration diagram for OA::CFG::CFG:

Collaboration graph
[legend]

List of all members.

Classes

class  NodeLabel
class  NodeLabelListIterator

Public Types

typedef std::list< NodeLabelNodeLabelList

Public Member Functions

 CFG ()
 ~CFG ()
 Constructs an empty standard CFGStandard.
OA_ptr< NodeInterfacegetEntry () const
 get ptr to unique entry node
OA_ptr< NodeInterfacegetExit () 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< NodesIteratorInterfacegetCFGNodesIterator () const
OA_ptr< EdgesIteratorInterfacegetCFGEdgesIterator () const
OA_ptr< NodesIteratorInterfacegetCFGEntryNodesIterator () const
OA_ptr< NodesIteratorInterfacegetCFGExitNodesIterator () const
OA_ptr< NodesIteratorInterfacegetCFGReversePostDFSIterator (DGraph::DGraphEdgeDirection pOrient)
OA_ptr< NodesIteratorInterfacegetCFGDFSIterator (OA_ptr< NodeInterface > n)
void setEntry (OA_ptr< Node > n)
void setExit (OA_ptr< Node > n)
OA_ptr< NodesplitBlock (OA_ptr< Node >, StmtHandle)
 Split the basic block 'block' at the given split point and return the new basic block.
OA_ptr< Edgeconnect (OA_ptr< NodeInterface > src, OA_ptr< NodeInterface > dst, EdgeType type)
OA_ptr< Edgeconnect (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< Nodenode_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< NodegetLabelBlock (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< NodemEntry
OA_ptr< NodemExit
std::map< OA::StmtLabel,
OA_ptr< Node > > 
mlabel_to_node_map

Friends

class NodeLabelListIterator


Detailed Description

Definition at line 349 of file CFG.hpp.


Member Typedef Documentation

Definition at line 473 of file CFG.hpp.


Constructor & Destructor Documentation

OA::CFG::CFG::CFG (  ) 

Definition at line 56 of file CFG.cpp.

OA::CFG::CFG::~CFG (  ) 

Constructs an empty standard CFGStandard.

commented out by PLM 08/08/06 CFG::CFG (SymHandle _name) : mName(_name)

Parameters:
_name SymbolHandle for procedure name
Destructor for CFGStandard

Definition at line 716 of file CFG.cpp.

References mEntry, mExit, mlabel_to_node_map, and NULL.


Member Function Documentation

void OA::CFG::CFG::connect ( CFG::NodeLabelList src_list,
OA_ptr< NodeInterface dst 
)

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

void OA::CFG::CFG::disconnect ( OA_ptr< NodeInterface n  ) 

Definition at line 564 of file CFG.cpp.

References OA::DGraph::DGraphImplement::removeNode().

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

OA_ptr< NodeInterface > OA::CFG::CFG::getEntry (  )  const [virtual]

get ptr to unique entry node

CFG

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.

Here is the call graph for this function:

void OA::CFG::CFG::setEntry ( OA_ptr< Node n  ) 

Definition at line 528 of file CFG.cpp.

References mEntry.

void OA::CFG::CFG::setExit ( OA_ptr< Node n  ) 

Definition at line 533 of file CFG.cpp.

References mExit.

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.

Parameters:
splitPoint The first statement in the new basic block.
After the operation is done, the new block contains all the outgoing edges from 'block'; in other words, 'block' will have *no* outgoing edges.

Definition at line 831 of file CFG.cpp.

References OA::DGraph::DGraphImplement::addNode(), connect(), and disconnect().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class NodeLabelListIterator [friend]

Definition at line 503 of file CFG.hpp.


Member Data Documentation

Definition at line 495 of file CFG.hpp.

Referenced by getEntry(), setEntry(), and ~CFG().

Definition at line 496 of file CFG.hpp.

Referenced by getExit(), setExit(), and ~CFG().

Definition at line 497 of file CFG.hpp.

Referenced by getLabelBlock(), isLabelMappedToNode(), mapLabelToNode(), node_from_label(), and ~CFG().

Definition at line 494 of file CFG.hpp.

Referenced by getName().


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

Generated on Fri Jul 24 05:39:38 2009 for OpenADFortTk (extended to Open64) by  doxygen 1.5.7.1