Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes

OA::DataFlow::ICFGDFSolver Class Reference

#include <ICFGDFSolver.hpp>

Inheritance diagram for OA::DataFlow::ICFGDFSolver:
Inheritance graph
[legend]
Collaboration diagram for OA::DataFlow::ICFGDFSolver:
Collaboration graph
[legend]

List of all members.

Public Types

enum  DFDirectionType { Forward, Backward }

Public Member Functions

 ICFGDFSolver (DFDirectionType pDirection, ICFGDFProblem &prob)
virtual ~ICFGDFSolver ()
void solve (OA_ptr< ICFG::ICFGInterface > icfg, DFPImplement algorithm)
int getNumIter ()
void dump (std::ostream &os, OA_ptr< IRHandlesIRInterface > ir)

Protected Attributes

std::map< OA_ptr
< ICFG::NodeInterface >
, OA_ptr< DataFlowSet > > 
mNodeInSetMap
std::map< OA_ptr
< ICFG::NodeInterface >
, OA_ptr< DataFlowSet > > 
mNodeOutSetMap
std::map< OA_ptr
< ICFG::NodeInterface >, bool > 
mNodeInitTransApp
ICFGDFProblemmDFProb

Private Member Functions

void initialize (OA_ptr< DGraph::DGraphInterface > dg)
bool atDGraphNode (OA_ptr< DGraph::NodeInterface > node, DGraph::DGraphEdgeDirection pOrient)
void finalizeNode (OA_ptr< DGraph::NodeInterface > node)
OA_ptr< DataFlowSettransfer (OA_ptr< DataFlowSet > in, OA_ptr< DGraph::NodeInterface > n)

Private Attributes

OA_ptr< DataFlowSetmTop
DFDirectionType mDirection

Detailed Description

Definition at line 39 of file ICFGDFSolver.hpp.


Member Enumeration Documentation

Enumerator:
Forward 
Backward 

Definition at line 41 of file ICFGDFSolver.hpp.


Constructor & Destructor Documentation

OA::DataFlow::ICFGDFSolver::ICFGDFSolver ( DFDirectionType  pDirection,
ICFGDFProblem prob 
)

Definition at line 20 of file ICFGDFSolver.cpp.

References OA::DataFlow::debug, and OA_DEBUG_CTRL_MACRO.

virtual OA::DataFlow::ICFGDFSolver::~ICFGDFSolver (  )  [inline, virtual]

Definition at line 53 of file ICFGDFSolver.hpp.


Member Function Documentation

bool OA::DataFlow::ICFGDFSolver::atDGraphNode ( OA_ptr< DGraph::NodeInterface node,
DGraph::DGraphEdgeDirection  pOrient 
) [private, virtual]
void OA::DataFlow::ICFGDFSolver::dump ( std::ostream &  os,
OA_ptr< IRHandlesIRInterface ir 
)

Definition at line 331 of file ICFGDFSolver.cpp.

References OA::OA_ptr< T >::dump(), mNodeInSetMap, and mNodeOutSetMap.

Here is the call graph for this function:

void OA::DataFlow::ICFGDFSolver::finalizeNode ( OA_ptr< DGraph::NodeInterface node  )  [private, virtual]

Reimplemented from OA::DataFlow::DGraphSolverDFP.

Definition at line 322 of file ICFGDFSolver.cpp.

int OA::DataFlow::ICFGDFSolver::getNumIter (  )  [inline]

Definition at line 62 of file ICFGDFSolver.hpp.

References OA::DataFlow::DGraphSolverDFP::afterSolve_getNumIter().

Here is the call graph for this function:

void OA::DataFlow::ICFGDFSolver::initialize ( OA_ptr< DGraph::DGraphInterface dg  )  [private, virtual]

commented by PLM 08/10/06 void ICFGDFSolver::initialize(OA_ptr<DGraph::DGraphInterface> dg) { OA_ptr<ICFG::ICFG> cfg = dg.convert<ICFG::ICFG>();

iterate over all nodes and call initialization routine that sets up DataFlowSets OA_ptr<ICFG::ICFG::NodesIterator> nodeIterPtr; nodeIterPtr = cfg->getNodesIterator(); if (debug) { std::cout << "initializing: looping over nodes:\n"; } for ( ;nodeIterPtr->isValid(); ++(*nodeIterPtr) ) { if (debug) { std::cout << "\tNode " << (nodeIterPtr->current())->getId() << std::endl; } mNodeInSetMap[nodeIterPtr->current()] = mDFProb.initializeNodeIN(nodeIterPtr->current()); mNodeOutSetMap[nodeIterPtr->current()] = mDFProb.initializeNodeOUT(nodeIterPtr->current()); mNodeInitTransApp[nodeIterPtr->current()] = false; } }

Implements OA::DataFlow::DGraphSolverDFP.

Definition at line 91 of file ICFGDFSolver.cpp.

void OA::DataFlow::ICFGDFSolver::solve ( OA_ptr< ICFG::ICFGInterface icfg,
DFPImplement  algorithm 
)

solves data-flow problem, after done in and out nodes will have correct data-flow values

Definition at line 27 of file ICFGDFSolver.cpp.

OA_ptr<DataFlowSet> OA::DataFlow::ICFGDFSolver::transfer ( OA_ptr< DataFlowSet in,
OA_ptr< DGraph::NodeInterface n 
) [private]

transfer function for a CFG::Interface::Node Will clone in set to block before passing it to this function so ok to return a modified in set


Member Data Documentation

Definition at line 113 of file ICFGDFSolver.hpp.

Referenced by atDGraphNode().

Definition at line 46 of file ICFGDFSolver.hpp.

Definition at line 111 of file ICFGDFSolver.hpp.

Referenced by atDGraphNode().

Definition at line 105 of file ICFGDFSolver.hpp.

Referenced by atDGraphNode(), and dump().

Definition at line 107 of file ICFGDFSolver.hpp.

Referenced by atDGraphNode(), and dump().

Definition at line 44 of file ICFGDFSolver.hpp.

Referenced by atDGraphNode().


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