Classes | Public Types | Public Member Functions | Private Attributes | Friends

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
SymHandle getName () const
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 54 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 714 of file CFG.cpp.

References mEntry, mExit, and mlabel_to_node_map.


Member Function Documentation

OA_ptr< Edge > OA::CFG::CFG::connect ( OA_ptr< NodeInterface src,
OA_ptr< NodeInterface dst,
EdgeType  type 
)

Definition at line 537 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,
ExprHandle  expr 
)

Definition at line 547 of file CFG.cpp.

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 884 of file CFG.cpp.

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

Connect each node in src_list to dst.

Definition at line 898 of file CFG.cpp.

void OA::CFG::CFG::disconnect ( OA_ptr< EdgeInterface e  ) 

Definition at line 557 of file CFG.cpp.

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

Definition at line 562 of file CFG.cpp.

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  ) 

Definition at line 499 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

Definition at line 468 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

Definition at line 476 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

Definition at line 483 of file CFG.cpp.

OA_ptr< NodesIteratorInterface > OA::CFG::CFG::getCFGNodesIterator (  )  const

DGraph Iterators

CFG Specific Iterators

Definition at line 460 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  ) 

Definition at line 491 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

get ptr to unique entry node

CFG

Definition at line 408 of file CFG.cpp.

References mEntry.

OA_ptr< NodeInterface > OA::CFG::CFG::getExit (  )  const

Definition at line 413 of file CFG.cpp.

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 756 of file CFG.cpp.

SymHandle OA::CFG::CFG::getName (  )  const

Definition at line 418 of file CFG.cpp.

bool OA::CFG::CFG::isLabelMappedToNode ( StmtLabel  lab  ) 

determine if the given label is currently mapped to a node

Definition at line 574 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 567 of file CFG.cpp.

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 772 of file CFG.cpp.

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

Definition at line 526 of file CFG.cpp.

References mEntry.

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

Definition at line 531 of file CFG.cpp.

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 829 of file CFG.cpp.


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

Definition at line 497 of file CFG.hpp.

Referenced by isLabelMappedToNode(), and ~CFG().

Definition at line 494 of file CFG.hpp.


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