Public Member Functions | Private Attributes

OA::ReachConsts::ReachConstsStandard Class Reference

#include <ReachConstsStandard.hpp>

Inheritance diagram for OA::ReachConsts::ReachConstsStandard:
Inheritance graph
[legend]
Collaboration diagram for OA::ReachConsts::ReachConstsStandard:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ReachConstsStandard (ProcHandle p)
 ~ReachConstsStandard ()
OA_ptr< ConstDefSetgetReachConsts (StmtHandle s)
 Return the set of reaching constants for a given stmt.
OA_ptr< ConstValBasicInterfacegetReachConst (MemRefHandle h)
void output (IRHandlesIRInterface &ir)
void insertConstDef (StmtHandle s, OA_ptr< ConstDef > cd, ConstDefType t=TOP)
 insert a reaching const def into the given stmt's const def set
void resetConstDefSet (StmtHandle s, ConstDefType t=TOP)
void updateReachConst (MemRefHandle ref, OA_ptr< ConstValBasicInterface > cPtr)
 change reaching constant for a given memory reference
void dump (std::ostream &os, OA_ptr< OA::IRHandlesIRInterface > ir)
OA_ptr< ConstDefSetIteratorgetConstDefIterator (StmtHandle s)
 get iterator over ConstDefSet for given statememt handle
std::string getMemRefConstInfo ()
 report number of memory references with constant value

Private Attributes

std::map< StmtHandle, OA_ptr
< ConstDefSet > > 
mReachConsts
std::map< MemRefHandle, OA_ptr
< ConstValBasicInterface > > 
mMemRef2ReachConst

Detailed Description

Definition at line 238 of file ReachConstsStandard.hpp.


Constructor & Destructor Documentation

OA::ReachConsts::ReachConstsStandard::ReachConstsStandard ( ProcHandle  p  )  [inline]

Definition at line 242 of file ReachConstsStandard.hpp.

OA::ReachConsts::ReachConstsStandard::~ReachConstsStandard (  )  [inline]

Definition at line 243 of file ReachConstsStandard.hpp.


Member Function Documentation

void OA::ReachConsts::ReachConstsStandard::dump ( std::ostream &  os,
OA_ptr< OA::IRHandlesIRInterface ir 
)

incomplete output of info for debugging, just lists stmts and associated set of stmts that are reaching defs for the given stmt

incomplete output of info for debugging, just lists stmts and associated set of ConstDefs that are reaching const defs for the given

Definition at line 321 of file ReachConstsStandard.cpp.

References OA::OA_ptr< T >::dump(), getReachConsts(), OA::IRHandle::hval(), mMemRef2ReachConst, mReachConsts, and OA::OA_ptr< T >::ptrEqual().

Here is the call graph for this function:

OA_ptr<ConstDefSetIterator> OA::ReachConsts::ReachConstsStandard::getConstDefIterator ( StmtHandle  s  )  [inline]

get iterator over ConstDefSet for given statememt handle

Definition at line 299 of file ReachConstsStandard.hpp.

References mReachConsts.

std::string OA::ReachConsts::ReachConstsStandard::getMemRefConstInfo (  ) 

report number of memory references with constant value

Returns a tab-delimited string with the number of total memory references known and then the number of memory references associated with a constant value.

Definition at line 464 of file ReachConstsStandard.cpp.

OA_ptr<ConstValBasicInterface> OA::ReachConsts::ReachConstsStandard::getReachConst ( MemRefHandle  h  )  [inline]

Return the ConstValBasicInterface of the reaching constant for the given memory reference Returns NULL if no constant value exists for this MemRefHandle

Definition at line 256 of file ReachConstsStandard.hpp.

References mMemRef2ReachConst.

OA_ptr<ConstDefSet> OA::ReachConsts::ReachConstsStandard::getReachConsts ( StmtHandle  s  )  [inline]

Return the set of reaching constants for a given stmt.

Definition at line 246 of file ReachConstsStandard.hpp.

References mReachConsts.

Referenced by dump().

void OA::ReachConsts::ReachConstsStandard::insertConstDef ( StmtHandle  s,
OA_ptr< ConstDef cd,
ConstDefType  t = TOP 
) [inline]

insert a reaching const def into the given stmt's const def set

Definition at line 270 of file ReachConstsStandard.hpp.

References mReachConsts.

void OA::ReachConsts::ReachConstsStandard::output ( OA::IRHandlesIRInterface ir  )  [virtual]

Implements OA::Annotation.

Definition at line 425 of file ReachConstsStandard.cpp.

References mReachConsts, and OA::Annotation::sOutBuild.

void OA::ReachConsts::ReachConstsStandard::resetConstDefSet ( StmtHandle  s,
ConstDefType  t = TOP 
) [inline]

reset a statement's const def set to null needed because no access to final NodeIn sets in CFGDFSolver forces us to save a statement's const def set during every transfer

Definition at line 281 of file ReachConstsStandard.hpp.

References mReachConsts.

void OA::ReachConsts::ReachConstsStandard::updateReachConst ( MemRefHandle  ref,
OA_ptr< ConstValBasicInterface cPtr 
) [inline]

change reaching constant for a given memory reference

Definition at line 285 of file ReachConstsStandard.hpp.

References mMemRef2ReachConst.


Member Data Documentation

Definition at line 313 of file ReachConstsStandard.hpp.

Referenced by dump(), getReachConst(), and updateReachConst().


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