OpenADFortTk (including Open64 and OpenAnalysis references)
|
#include <CFGDFSolver.hpp>
Public Types | |
enum | DFDirectionType { Forward, Backward } |
Public Member Functions | |
CFGDFSolver (DFDirectionType pDirection, CFGDFProblem &prob) | |
virtual | ~CFGDFSolver () |
OA_ptr< DataFlowSet > | solve (OA_ptr< CFG::CFGInterface > cfg, DFPImplement algorithm) |
OA_ptr< DataFlow::DataFlowSet > | getInSet (OA_ptr< CFG::NodeInterface > node) |
OA_ptr< DataFlow::DataFlowSet > | getOutSet (OA_ptr< CFG::NodeInterface > node) |
void | dump (std::ostream &os, OA_ptr< IRHandlesIRInterface > ir) |
Protected Attributes | |
std::map< OA_ptr < CFG::NodeInterface >, OA_ptr < DataFlowSet > > | mNodeInSetMap |
std::map< OA_ptr < CFG::NodeInterface >, OA_ptr < DataFlowSet > > | mNodeOutSetMap |
std::map< OA_ptr < CFG::NodeInterface >, bool > | mNodeInitTransApp |
CFGDFProblem & | mDFProb |
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< DataFlowSet > | transfer (OA_ptr< DataFlowSet > in, OA_ptr< DGraph::NodeInterface > n) |
Private Member Functions inherited from OA::DataFlow::DGraphSolverDFP | |
DGraphSolverDFP () | |
~DGraphSolverDFP () | |
void | solve (OA_ptr< DGraph::DGraphInterface > dg, DGraph::DGraphEdgeDirection alongFlow, DFPImplement algorithm) |
int | afterSolve_getNumIter () |
Private Attributes | |
OA_ptr< DataFlowSet > | mTop |
DFDirectionType | mDirection |
Definition at line 42 of file CFGDFSolver.hpp.
Enumerator | |
---|---|
Forward | |
Backward |
Definition at line 45 of file CFGDFSolver.hpp.
OA::DataFlow::CFGDFSolver::CFGDFSolver | ( | DFDirectionType | pDirection, |
CFGDFProblem & | prob | ||
) |
Definition at line 27 of file CFGDFSolver.cpp.
References OA::DataFlow::debug, and OA_DEBUG_CTRL_MACRO.
|
inlinevirtual |
Definition at line 57 of file CFGDFSolver.hpp.
|
privatevirtual |
Reimplemented from OA::DataFlow::DGraphSolverDFP.
Definition at line 111 of file CFGDFSolver.cpp.
References OA::OA_ptr< T >::convert(), OA::DataFlow::debug, OA::DGraph::DEdgeOrg, OA::CFG::NodeInterface::getCFGPredNodesIterator(), OA::CFG::NodeInterface::getCFGSuccNodesIterator(), OA::DGraph::NodeInterface::getId(), OA::IRHandle::hval(), mDFProb, OA::DataFlow::CFGDFProblem::meet(), mNodeInitTransApp, mNodeInSetMap, mNodeOutSetMap, mTop, and OA::DataFlow::CFGDFProblem::transfer().
void OA::DataFlow::CFGDFSolver::dump | ( | std::ostream & | os, |
OA_ptr< IRHandlesIRInterface > | ir | ||
) |
commented out by PLM 08/08/06
iterate over all entries in mNodeInSetMap and mNodeOutSetMap std::map<OA_ptr<CFG::NodeInterface>, OA_ptr<DataFlowSet> >::iterator mapIter; for (mapIter=mNodeInSetMap.begin(); mapIter!=mNodeInSetMap.end(); mapIter++) { OA_ptr<DataFlowSet> dfset = mapIter->second; os << "Node (" << mapIter->first << ") In: "; dfset->dump(os,ir); os << std::endl; } for (mapIter=mNodeOutSetMap.begin(); mapIter!=mNodeOutSetMap.end(); mapIter++) { OA_ptr<DataFlowSet> dfset = mapIter->second; os << "Node (" << mapIter->first << ") Out: "; dfset->dump(os,ir); os << std::endl; }
Definition at line 269 of file CFGDFSolver.cpp.
|
privatevirtual |
Reimplemented from OA::DataFlow::DGraphSolverDFP.
Definition at line 256 of file CFGDFSolver.cpp.
|
inline |
Definition at line 75 of file CFGDFSolver.hpp.
References mNodeInSetMap.
|
inline |
Definition at line 77 of file CFGDFSolver.hpp.
References mNodeOutSetMap.
Referenced by OA::AvailableExpressions::ManagerAvailableExpressionsStandard::performAnalysis(), OA::ReachDefsOverwrite::ManagerReachDefsOverwriteStandard::performAnalysis(), OA::ReachingDefs::ManagerReachingDefsStandard::performAnalysis(), OA::Liveness::ManagerLivenessStandard::performAnalysis(), OA::Activity::ManagerUsefulStandard::performAnalysis(), OA::ReachDefs::ManagerReachDefsStandard::performAnalysis(), and OA::Linearity::ManagerLinearity::performAnalysis().
|
privatevirtual |
added by PLM 08/10/06
Implements OA::DataFlow::DGraphSolverDFP.
Definition at line 74 of file CFGDFSolver.cpp.
References OA::OA_ptr< T >::convert(), OA::CFG::CFGInterface::getCFGNodesIterator(), OA::DataFlow::CFGDFProblem::initializeNodeIN(), OA::DataFlow::CFGDFProblem::initializeNodeOUT(), mDFProb, mNodeInitTransApp, mNodeInSetMap, and mNodeOutSetMap.
OA_ptr< DataFlowSet > OA::DataFlow::CFGDFSolver::solve | ( | OA_ptr< CFG::CFGInterface > | cfg, |
DFPImplement | algorithm | ||
) |
returns DataFlowSet for Exit for a forward problem and for Entry for a backward proble
Definition at line 33 of file CFGDFSolver.cpp.
References OA::DGraph::DEdgeOrg, OA::DGraph::DEdgeRev, Forward, OA::CFG::CFGInterface::getEntry(), OA::CFG::CFGInterface::getExit(), OA::DataFlow::CFGDFProblem::initializeTop(), mDFProb, mDirection, mNodeInitTransApp, mNodeInSetMap, mNodeOutSetMap, mTop, and OA::DataFlow::DGraphSolverDFP::solve().
Referenced by OA::AvailableExpressions::ManagerAvailableExpressionsStandard::performAnalysis(), OA::Liveness::ManagerLivenessStandard::performAnalysis(), OA::ReachDefsOverwrite::ManagerReachDefsOverwriteStandard::performAnalysis(), OA::ReachingDefs::ManagerReachingDefsStandard::performAnalysis(), OA::Activity::ManagerUsefulStandard::performAnalysis(), OA::Activity::ManagerDepStandard::performAnalysis(), OA::ReachDefs::ManagerReachDefsStandard::performAnalysis(), OA::ReachConsts::ManagerReachConstsStandard::performAnalysis(), and OA::Linearity::ManagerLinearity::performAnalysis().
|
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
|
protected |
Definition at line 127 of file CFGDFSolver.hpp.
Referenced by atDGraphNode(), initialize(), and solve().
|
private |
Definition at line 50 of file CFGDFSolver.hpp.
Referenced by solve().
|
protected |
Definition at line 126 of file CFGDFSolver.hpp.
Referenced by atDGraphNode(), initialize(), and solve().
|
protected |
Definition at line 121 of file CFGDFSolver.hpp.
Referenced by atDGraphNode(), getInSet(), initialize(), and solve().
|
protected |
Definition at line 122 of file CFGDFSolver.hpp.
Referenced by atDGraphNode(), getOutSet(), initialize(), and solve().
|
private |
Definition at line 48 of file CFGDFSolver.hpp.
Referenced by atDGraphNode(), and solve().