Public Member Functions | Private Member Functions | Private Attributes

OA::Activity::ManagerICFGVaryActive Class Reference

#include <ManagerICFGVaryActive.hpp>

Inheritance diagram for OA::Activity::ManagerICFGVaryActive:
Inheritance graph
[legend]
Collaboration diagram for OA::Activity::ManagerICFGVaryActive:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ManagerICFGVaryActive (OA_ptr< ActivityIRInterface > _ir)
 ~ManagerICFGVaryActive ()
OA_ptr< ActivePerStmtperformAnalysis (OA_ptr< ICFG::ICFGInterface > icfg, OA_ptr< DataFlow::ParamBindings > paramBind, OA_ptr< Alias::InterAliasInterface > interAlias, OA_ptr< ICFGDep > icfgDep, OA_ptr< InterUseful > interUseful, DataFlow::DFPImplement algorithm)

Private Member Functions

OA_ptr< DataFlow::LocDFSetcalculateActive (OA_ptr< LocIterator > varyIter, OA_ptr< LocIterator > usefulIter, StmtHandle stmt)
OA_ptr< DataFlow::DataFlowSetinitializeTop ()
 Return an initialized top set.
OA_ptr< DataFlow::DataFlowSetinitializeNodeIN (OA_ptr< ICFG::NodeInterface > n)
 Should generate an in and out DataFlowSet for node.
OA_ptr< DataFlow::DataFlowSetinitializeNodeOUT (OA_ptr< ICFG::NodeInterface > n)
OA_ptr< DataFlow::DataFlowSetmeet (OA_ptr< DataFlow::DataFlowSet > set1, OA_ptr< DataFlow::DataFlowSet > set2)
OA_ptr< DataFlow::DataFlowSettransfer (ProcHandle proc, OA_ptr< DataFlow::DataFlowSet > in, OA::StmtHandle stmt)
OA_ptr< DataFlow::DataFlowSetentryTransfer (ProcHandle proc, OA_ptr< DataFlow::DataFlowSet > in)
OA_ptr< DataFlow::DataFlowSetexitTransfer (ProcHandle proc, OA_ptr< DataFlow::DataFlowSet > out)
OA_ptr< DataFlow::DataFlowSetcallerToCallee (ProcHandle caller, OA_ptr< DataFlow::DataFlowSet > dfset, CallHandle call, ProcHandle callee)
 Propagate a data-flow set from caller to callee.
OA_ptr< DataFlow::DataFlowSetcalleeToCaller (ProcHandle callee, OA_ptr< DataFlow::DataFlowSet > dfset, CallHandle call, ProcHandle caller)
 Propagate a data-flow set from callee to caller.
OA_ptr< DataFlow::DataFlowSetcallToReturn (ProcHandle caller, OA_ptr< DataFlow::DataFlowSet > dfset, CallHandle call, ProcHandle callee)
 Propagate a data-flow set from call node to return node.

Private Attributes

OA_ptr< ActivePerStmtmActive
OA_ptr< InterUsefulmInterUseful
OA_ptr< ActivityIRInterfacemIR
OA_ptr< DataFlow::ParamBindingsmParamBind
OA_ptr< ICFGDepmICFGDep
OA_ptr
< Alias::InterAliasInterface
mInterAlias
OA_ptr< DataFlow::ICFGDFSolvermSolver
OA_ptr< ICFG::ICFGInterfacemICFG

Detailed Description

Creates ActivePerStmt, which can be queried for the sets of locs that are InActive and/or OutActive for each stmt.

Definition at line 46 of file ManagerICFGVaryActive.hpp.


Constructor & Destructor Documentation

OA::Activity::ManagerICFGVaryActive::ManagerICFGVaryActive ( OA_ptr< ActivityIRInterface _ir  ) 

Definition at line 22 of file ManagerICFGVaryActive.cpp.

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

OA::Activity::ManagerICFGVaryActive::~ManagerICFGVaryActive (  )  [inline]

Definition at line 50 of file ManagerICFGVaryActive.hpp.


Member Function Documentation

OA_ptr< DataFlow::LocDFSet > OA::Activity::ManagerICFGVaryActive::calculateActive ( OA_ptr< LocIterator varyIter,
OA_ptr< LocIterator usefulIter,
StmtHandle  stmt 
) [private]

A helper function that determines active locations, whether the previous stmt was active, and which memory references in the previous and current stmt are active

Definition at line 232 of file ManagerICFGVaryActive.cpp.

OA_ptr< DataFlow::DataFlowSet > OA::Activity::ManagerICFGVaryActive::calleeToCaller ( ProcHandle  callee,
OA_ptr< DataFlow::DataFlowSet dfset,
CallHandle  call,
ProcHandle  caller 
) [private, virtual]

Propagate a data-flow set from callee to caller.

Implements OA::DataFlow::ICFGDFProblem.

Definition at line 462 of file ManagerICFGVaryActive.cpp.

OA_ptr< DataFlow::DataFlowSet > OA::Activity::ManagerICFGVaryActive::callerToCallee ( ProcHandle  caller,
OA_ptr< DataFlow::DataFlowSet dfset,
CallHandle  call,
ProcHandle  callee 
) [private, virtual]

Propagate a data-flow set from caller to callee.

Implements OA::DataFlow::ICFGDFProblem.

Definition at line 398 of file ManagerICFGVaryActive.cpp.

References OA::OA_ptr< T >::convert(), OA::LocSetIterator::current(), OA::Activity::debug, OA::OA_ptr< T >::dump(), OA::LocSetIterator::isValid(), mInterAlias, mIR, and mParamBind.

Here is the call graph for this function:

OA_ptr< DataFlow::DataFlowSet > OA::Activity::ManagerICFGVaryActive::callToReturn ( ProcHandle  caller,
OA_ptr< DataFlow::DataFlowSet dfset,
CallHandle  call,
ProcHandle  callee 
) [private, virtual]

Propagate a data-flow set from call node to return node.

Implements OA::DataFlow::ICFGDFProblem.

Definition at line 472 of file ManagerICFGVaryActive.cpp.

OA_ptr< DataFlow::DataFlowSet > OA::Activity::ManagerICFGVaryActive::entryTransfer ( ProcHandle  proc,
OA_ptr< DataFlow::DataFlowSet in 
) [private, virtual]

transfer function for the entry node of the given procedure should manipulate incoming data-flow set in any special ways for procedure and return outgoing data-flow set for node

Will get the indep vars if this procedure has any and add them to incoming LocDFSet

Implements OA::DataFlow::ICFGDFProblem.

Definition at line 334 of file ManagerICFGVaryActive.cpp.

OA_ptr< DataFlow::DataFlowSet > OA::Activity::ManagerICFGVaryActive::exitTransfer ( ProcHandle  proc,
OA_ptr< DataFlow::DataFlowSet out 
) [private, virtual]

transfer function for the exit node of the given procedure should manipulate outgoing data-flow set in any special ways for procedure and return incoming data-flow set for node

Just pass along out because this won't be called since we are a Forward analysis

Implements OA::DataFlow::ICFGDFProblem.

Definition at line 389 of file ManagerICFGVaryActive.cpp.

OA_ptr< DataFlow::DataFlowSet > OA::Activity::ManagerICFGVaryActive::initializeNodeIN ( OA_ptr< ICFG::NodeInterface n  )  [private, virtual]

Should generate an in and out DataFlowSet for node.

Implements OA::DataFlow::ICFGDFProblem.

Definition at line 173 of file ManagerICFGVaryActive.cpp.

OA_ptr< DataFlow::DataFlowSet > OA::Activity::ManagerICFGVaryActive::initializeNodeOUT ( OA_ptr< ICFG::NodeInterface n  )  [private, virtual]

Implements OA::DataFlow::ICFGDFProblem.

Definition at line 182 of file ManagerICFGVaryActive.cpp.

OA_ptr< DataFlow::DataFlowSet > OA::Activity::ManagerICFGVaryActive::initializeTop (  )  [private, virtual]

Return an initialized top set.

Data-flow set passed around on the call graph is an LocDFSet. The top value for this is an empty set.

Implements OA::DataFlow::ICFGDFProblem.

Definition at line 165 of file ManagerICFGVaryActive.cpp.

OA_ptr< DataFlow::DataFlowSet > OA::Activity::ManagerICFGVaryActive::meet ( OA_ptr< DataFlow::DataFlowSet set1,
OA_ptr< DataFlow::DataFlowSet set2 
) [private, virtual]

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

Implements OA::DataFlow::ICFGDFProblem.

Definition at line 198 of file ManagerICFGVaryActive.cpp.

References OA::OA_ptr< T >::convert(), OA::Activity::debug, OA::OA_ptr< T >::dump(), mIR, and OA::DataFlow::LocDFSet::setUnion().

Here is the call graph for this function:

OA_ptr< Activity::ActivePerStmt > OA::Activity::ManagerICFGVaryActive::performAnalysis ( OA_ptr< ICFG::ICFGInterface icfg,
OA_ptr< DataFlow::ParamBindings paramBind,
OA_ptr< Alias::InterAliasInterface interAlias,
OA_ptr< ICFGDep icfgDep,
OA_ptr< InterUseful interUseful,
DataFlow::DFPImplement  algorithm 
)

Definition at line 30 of file ManagerICFGVaryActive.cpp.

OA_ptr< DataFlow::DataFlowSet > OA::Activity::ManagerICFGVaryActive::transfer ( ProcHandle  proc,
OA_ptr< DataFlow::DataFlowSet in,
OA::StmtHandle  stmt 
) [private, virtual]

OK to modify in set and return it again as result because solver clones the BB in sets

Implements OA::DataFlow::ICFGDFProblem.

Definition at line 277 of file ManagerICFGVaryActive.cpp.

References OA::OA_ptr< T >::convert(), OA::LocSetIterator::current(), OA::Activity::debug, OA::OA_ptr< T >::dump(), OA::IRHandle::hval(), OA::LocSetIterator::isValid(), mActive, mICFGDep, and mIR.

Here is the call graph for this function:


Member Data Documentation

Definition at line 124 of file ManagerICFGVaryActive.hpp.

Referenced by transfer().

Definition at line 131 of file ManagerICFGVaryActive.hpp.

Definition at line 128 of file ManagerICFGVaryActive.hpp.

Referenced by transfer().

Definition at line 129 of file ManagerICFGVaryActive.hpp.

Referenced by callerToCallee().

Definition at line 125 of file ManagerICFGVaryActive.hpp.

Definition at line 126 of file ManagerICFGVaryActive.hpp.

Referenced by callerToCallee(), meet(), and transfer().

Definition at line 127 of file ManagerICFGVaryActive.hpp.

Referenced by callerToCallee().

Definition at line 130 of file ManagerICFGVaryActive.hpp.


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