OA::ReachDefs::ManagerReachDefsStandard Class Reference

#include <ManagerReachDefsStandard.hpp>

Inheritance diagram for OA::ReachDefs::ManagerReachDefsStandard:
Inheritance graph
[legend]
Collaboration diagram for OA::ReachDefs::ManagerReachDefsStandard:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ManagerReachDefsStandard (OA_ptr< ReachDefsIRInterface > _ir)
 ~ManagerReachDefsStandard ()
OA_ptr< ReachDefsStandardperformAnalysis (ProcHandle, OA_ptr< CFG::CFGInterface > cfg, OA_ptr< Alias::Interface > alias, OA_ptr< SideEffect::InterSideEffectInterface > interSE, DataFlow::DFPImplement algorithm)
 Used to perform analysis when not using AQM.

Protected Member Functions

OA_ptr< DataFlow::DataFlowSetinitializeTop ()
OA_ptr< DataFlow::DataFlowSetinitializeBottom ()
 Return an initialized bottom set.
OA_ptr< DataFlow::DataFlowSetinitializeNodeIN (OA_ptr< CFG::NodeInterface > n)
 Should generate an in and out DataFlowSet for node.
OA_ptr< DataFlow::DataFlowSetinitializeNodeOUT (OA_ptr< CFG::NodeInterface > n)
OA_ptr< DataFlow::DataFlowSetmeet (OA_ptr< DataFlow::DataFlowSet > set1, OA_ptr< DataFlow::DataFlowSet > set2)
OA_ptr< DataFlow::DataFlowSettransfer (OA_ptr< DataFlow::DataFlowSet > in, OA::StmtHandle stmt)
 Core of analysis algorithm. Transfer function for a stmt.

Protected Attributes

OA_ptr< ReachDefsIRInterfacemIR
OA_ptr< Alias::InterfacemAlias
OA_ptr< ReachDefsStandardmReachDefMap
std::map< StmtHandle, std::set
< OA_ptr< Location > > > 
mStmtMayDefMap
std::map< StmtHandle, std::set
< OA_ptr< Location > > > 
mStmtMustDefMap
OA_ptr< DataFlow::CFGDFSolvermSolver

Detailed Description

The AnnotationManager for ReachDefsStandard. This class can build an ReachDefsStandard, (eventually) read one in from a file, and write one out to a file.

Definition at line 43 of file ManagerReachDefsStandard.hpp.


Constructor & Destructor Documentation

OA::ReachDefs::ManagerReachDefsStandard::ManagerReachDefsStandard ( OA_ptr< ReachDefsIRInterface _ir  ) 

Definition at line 28 of file ManagerReachDefsStandard.cpp.

References OA::DataFlow::CFGDFSolver::Forward, and mSolver.

OA::ReachDefs::ManagerReachDefsStandard::~ManagerReachDefsStandard (  )  [inline]

Definition at line 50 of file ManagerReachDefsStandard.hpp.


Member Function Documentation

OA_ptr< DataFlow::DataFlowSet > OA::ReachDefs::ManagerReachDefsStandard::initializeBottom (  )  [protected, virtual]

Return an initialized bottom set.

Implements OA::DataFlow::CFGDFProblem.

Definition at line 41 of file ManagerReachDefsStandard.cpp.

OA_ptr< DataFlow::DataFlowSet > OA::ReachDefs::ManagerReachDefsStandard::initializeNodeIN ( OA_ptr< CFG::NodeInterface n  )  [protected, virtual]

Should generate an in and out DataFlowSet for node.

* Not doing anything special at entries and exits. *

Implements OA::DataFlow::CFGDFProblem.

Definition at line 163 of file ManagerReachDefsStandard.cpp.

OA_ptr< DataFlow::DataFlowSet > OA::ReachDefs::ManagerReachDefsStandard::initializeNodeOUT ( OA_ptr< CFG::NodeInterface n  )  [protected, virtual]

Implements OA::DataFlow::CFGDFProblem.

Definition at line 171 of file ManagerReachDefsStandard.cpp.

OA_ptr< DataFlow::DataFlowSet > OA::ReachDefs::ManagerReachDefsStandard::initializeTop (  )  [protected, virtual]

this method will be used when the AQM is working because the CFG and MemRefExpr information will be queried from AnnotationQueryManager

Implements OA::DataFlow::CFGDFProblem.

Definition at line 34 of file ManagerReachDefsStandard.cpp.

OA_ptr< DataFlow::DataFlowSet > OA::ReachDefs::ManagerReachDefsStandard::meet ( OA_ptr< DataFlow::DataFlowSet set1,
OA_ptr< DataFlow::DataFlowSet set2 
) [protected, virtual]

OK to modify set1 and return it as result, because solver only passes a tempSet in as set1

Implements OA::DataFlow::CFGDFProblem.

Definition at line 181 of file ManagerReachDefsStandard.cpp.

References OA::DataFlow::IRHandleDataFlowSet< T >::clone(), OA::OA_ptr< T >::convert(), OA::ReachDefs::debug, OA::DataFlow::IRHandleDataFlowSet< T >::dump(), OA::OA_ptr< T >::dump(), and mIR.

Here is the call graph for this function:

OA_ptr< ReachDefsStandard > OA::ReachDefs::ManagerReachDefsStandard::performAnalysis ( ProcHandle  proc,
OA_ptr< CFG::CFGInterface cfg,
OA_ptr< Alias::Interface alias,
OA_ptr< SideEffect::InterSideEffectInterface interSE,
DataFlow::DFPImplement  algorithm 
)

Used to perform analysis when not using AQM.

Uses the CFGDFProblem::solve functionality to get In and Out reaching definition sets for each basic block. Then uses the statement transfer function to get an In set for each stmt.

Reimplemented in OA::ReachDefsOverwrite::ManagerReachDefsOverwriteStandard.

Definition at line 55 of file ManagerReachDefsStandard.cpp.

References OA::OA_ptr< T >::convert(), OA::ReachDefs::debug, OA::OA_ptr< T >::dump(), OA::IRHandle::hval(), mAlias, mIR, mReachDefMap, mSolver, mStmtMayDefMap, and mStmtMustDefMap.

Here is the call graph for this function:

OA_ptr< DataFlow::DataFlowSet > OA::ReachDefs::ManagerReachDefsStandard::transfer ( OA_ptr< DataFlow::DataFlowSet in,
OA::StmtHandle  stmt 
) [protected, virtual]

Core of analysis algorithm. Transfer function for a stmt.

KILL is the set of reaching definitions (statements) that may define the set of locations that are must defined in this statement

DEF is this statement if it may define anything

Implements OA::DataFlow::CFGDFProblem.

Reimplemented in OA::ReachDefsOverwrite::ManagerReachDefsOverwriteStandard.

Definition at line 216 of file ManagerReachDefsStandard.cpp.

References OA::OA_ptr< T >::convert(), OA::DataFlow::IRHandleIterator< T >::current(), OA::ReachDefs::debug, OA::OA_ptr< T >::dump(), OA::dumpLocSet(), OA::IRHandle::hval(), OA::intersectLocSets(), OA::DataFlow::IRHandleIterator< T >::isValid(), mIR, mReachDefMap, mStmtMayDefMap, mStmtMustDefMap, and OA::subSetOf().

Here is the call graph for this function:


Member Data Documentation

Definition at line 89 of file ManagerReachDefsStandard.hpp.

Referenced by performAnalysis(), and transfer().


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

Generated on Sat Oct 31 05:32:49 2009 for OpenAnalysis by  doxygen 1.6.1