#include <ManagerReachConstsStandard.hpp>


The AnnotationManager for ReachConstsStandard. This class can build an ReachConstsStandard, (eventually) read one in from a file, and write one out to a file.
Definition at line 49 of file ManagerReachConstsStandard.hpp.
enum OA::ReachConsts::ManagerReachConstsStandard::MeetOp [private] |
Definition at line 117 of file ManagerReachConstsStandard.hpp.
| OA::ReachConsts::ManagerReachConstsStandard::ManagerReachConstsStandard | ( | OA_ptr< ReachConstsIRInterface > | _ir | ) |
Definition at line 34 of file ManagerReachConstsStandard.cpp.
| OA::ReachConsts::ManagerReachConstsStandard::~ManagerReachConstsStandard | ( | ) | [inline] |
Definition at line 54 of file ManagerReachConstsStandard.hpp.
| ManagerReachConstsStandard::MeetOp OA::ReachConsts::ManagerReachConstsStandard::getMayOnlyMeetOp | ( | OA_ptr< ConstDef > | cd1, | |
| OA_ptr< ConstDef > | cd2 | |||
| ) | [private] |
Decides meet operation for two ConstDefs that are may(not must)Locs.
Definition at line 734 of file ManagerReachConstsStandard.cpp.
Referenced by meet().
| ManagerReachConstsStandard::MeetOp OA::ReachConsts::ManagerReachConstsStandard::getMustMeetOp | ( | OA_ptr< ConstDef > | cd1, | |
| OA_ptr< ConstDef > | cd2 | |||
| ) | [private] |
Decides meet operation for two ConstDefs that are mustLocs.
Definition at line 671 of file ManagerReachConstsStandard.cpp.
Referenced by meet().
| OA_ptr< DataFlow::DataFlowSet > OA::ReachConsts::ManagerReachConstsStandard::initializeBottom | ( | ) | [private, virtual] |
Return an initialized bottom set.
Implements OA::DataFlow::CFGDFProblem.
Definition at line 105 of file ManagerReachConstsStandard.cpp.
| void OA::ReachConsts::ManagerReachConstsStandard::initializeNode | ( | OA_ptr< CFG::NodeInterface > | n | ) | [private] |
| OA_ptr< DataFlow::DataFlowSet > OA::ReachConsts::ManagerReachConstsStandard::initializeNodeIN | ( | OA_ptr< CFG::NodeInterface > | n | ) | [private, virtual] |
Should generate an in and out DataFlowSet for node.
Implements OA::DataFlow::CFGDFProblem.
Definition at line 231 of file ManagerReachConstsStandard.cpp.
References initializeTopAndBottom(), mAllBottom, mAllTop, mCFG, and OA::OA_ptr< T >::ptrEqual().

| OA_ptr< DataFlow::DataFlowSet > OA::ReachConsts::ManagerReachConstsStandard::initializeNodeOUT | ( | OA_ptr< CFG::NodeInterface > | n | ) | [private, virtual] |
Implements OA::DataFlow::CFGDFProblem.
Definition at line 245 of file ManagerReachConstsStandard.cpp.
| OA_ptr< DataFlow::DataFlowSet > OA::ReachConsts::ManagerReachConstsStandard::initializeTop | ( | ) | [private, virtual] |
Return an initialized top set.
Implements OA::DataFlow::CFGDFProblem.
Definition at line 93 of file ManagerReachConstsStandard.cpp.
| void OA::ReachConsts::ManagerReachConstsStandard::initializeTopAndBottom | ( | ) | [private] |
helper method for initializeTop and initializeBottom
Definition at line 41 of file ManagerReachConstsStandard.cpp.
Referenced by initializeNodeIN().
| OA_ptr< DataFlow::DataFlowSet > OA::ReachConsts::ManagerReachConstsStandard::meet | ( | OA_ptr< DataFlow::DataFlowSet > | set1, | |
| OA_ptr< DataFlow::DataFlowSet > | set2 | |||
| ) | [private, virtual] |
meet routine for ReachConsts
Implements OA::DataFlow::CFGDFProblem.
Definition at line 286 of file ManagerReachConstsStandard.cpp.
References BOTHtoBOTTOM, OA::ReachConsts::BOTTOM, CD1toBOTTOM, CD1toVALUECD2, CD2toBOTTOM, CD2toVALUECD1, OA::OA_ptr< T >::convert(), OA::ReachConsts::ConstDefSetIterator::current(), OA::OA_ptr< T >::dump(), getMayOnlyMeetOp(), getMustMeetOp(), OA::ReachConsts::ConstDefSet::insert(), OA::ReachConsts::ConstDefSetIterator::isValid(), OA::ReachConsts::meet_debug, mIR, NOTHING, OA::ReachConsts::ConstDefSetIterator::reset(), and OA::ReachConsts::VALUE.

| OA_ptr< ReachConstsStandard > OA::ReachConsts::ManagerReachConstsStandard::performAnalysis | ( | ProcHandle | proc, | |
| OA_ptr< CFG::CFGInterface > | cfg, | |||
| OA_ptr< Alias::Interface > | alias, | |||
| OA_ptr< SideEffect::InterSideEffectInterface > | interSE, | |||
| DataFlow::DFPImplement | algorithm | |||
| ) |
Uses the CFGDFProblem::solve functionality to get In and Out constant definition sets for each basic block. Then uses the statement transfer function to get an In set for each stmt.
Definition at line 122 of file ManagerReachConstsStandard.cpp.
| void OA::ReachConsts::ManagerReachConstsStandard::setDefMemRef2Const | ( | StmtHandle | stmt, | |
| const ConstDefSet & | in | |||
| ) | [private] |
Sets mMemRef2ReachConst[defMemRef] for defMemRefs in given statement ConstDefSet, in, should not be changed
Definition at line 865 of file ManagerReachConstsStandard.cpp.
References OA::ReachConsts::ConstDefSet::find(), mAlias, mIR, mRCS, OA::OA_ptr< T >::ptrEqual(), and OA::ReachConsts::transfer_debug.
Referenced by transfer().

| void OA::ReachConsts::ManagerReachConstsStandard::setUseMemRef2Const | ( | StmtHandle | stmt, | |
| const ConstDefSet & | in | |||
| ) | [private] |
Sets mMemRef2ReachConst[useMemRef] for useMemRefs in given statement ConstDefSet, in, should not be changed
Definition at line 791 of file ManagerReachConstsStandard.cpp.
References OA::ReachConsts::ConstDefSet::find(), mAlias, mIR, mRCS, OA::OA_ptr< T >::ptrEqual(), and OA::ReachConsts::transfer_debug.
Referenced by transfer().

| OA_ptr< DataFlow::DataFlowSet > OA::ReachConsts::ManagerReachConstsStandard::transfer | ( | OA_ptr< DataFlow::DataFlowSet > | in, | |
| OA::StmtHandle | stmt | |||
| ) | [private, virtual] |
Core of analysis algorithm. Transfer function for a stmt.
KILL is the set of reaching const definitions <Loc,Const> where Loc MayOverlap a MayLoc for this statement (remember that MustOverlap is a subset of MayOverlap and that MustLoc is a subset of MayLoc) killREPLACE is the new ConstDef definition for the ConstDef in the KILL set These replace the reaching ConstDef with a ConstDefType of BOTTOM.
GEN: When statement expression evaluates to a non-null ConstValBasic, GEN is the set of const definitions <Loc,Const> where Loc is a MustLoc and MustOverlap for targets of this statement (The loc doesn't have to be in the inSet and it has to be a MustLoc. Loop through all the MustLocs for the MemRefExpr and pair them up with the ConstValBasic for the expression. Insert these into the inSet, replacing any existing ConstDef for that MustLoc.
Update inSet = inSet ( - KILLS + killREPLACE) + GEN Transfer function for ReachConsts, inReachConsts->stmt->outReachConsts
Implements OA::DataFlow::CFGDFProblem.
Definition at line 501 of file ManagerReachConstsStandard.cpp.
References OA::ReachConsts::BOTTOM, OA::OA_ptr< T >::convert(), OA::ReachConsts::debug, OA::OA_ptr< T >::dump(), OA::EvalToConstVisitor::getConstVal(), OA::IRHandle::hval(), mAlias, mInterSE, mIR, mRCS, OA::OA_ptr< T >::ptrEqual(), setDefMemRef2Const(), setUseMemRef2Const(), OA::ReachConsts::transfer_debug, and OA::ReachConsts::VALUE.

Definition at line 131 of file ManagerReachConstsStandard.hpp.
Referenced by setDefMemRef2Const(), setUseMemRef2Const(), and transfer().
Definition at line 135 of file ManagerReachConstsStandard.hpp.
Referenced by initializeNodeIN().
Definition at line 134 of file ManagerReachConstsStandard.hpp.
Referenced by initializeNodeIN().
Definition at line 136 of file ManagerReachConstsStandard.hpp.
Referenced by initializeNodeIN().
OA_ptr<SideEffect::InterSideEffectInterface> OA::ReachConsts::ManagerReachConstsStandard::mInterSE [private] |
Definition at line 137 of file ManagerReachConstsStandard.hpp.
Referenced by transfer().
Definition at line 129 of file ManagerReachConstsStandard.hpp.
Referenced by meet(), setDefMemRef2Const(), setUseMemRef2Const(), and transfer().
Definition at line 130 of file ManagerReachConstsStandard.hpp.
Definition at line 138 of file ManagerReachConstsStandard.hpp.
Referenced by setDefMemRef2Const(), setUseMemRef2Const(), and transfer().
Definition at line 140 of file ManagerReachConstsStandard.hpp.
std::map<StmtHandle,std::set<OA_ptr<Location> > > OA::ReachConsts::ManagerReachConstsStandard::mStmtMayDefMap [private] |
Definition at line 132 of file ManagerReachConstsStandard.hpp.
std::map<StmtHandle,std::set<OA_ptr<Location> > > OA::ReachConsts::ManagerReachConstsStandard::mStmtMustDefMap [private] |
Definition at line 133 of file ManagerReachConstsStandard.hpp.
1.7.1