OA::Alias::EquivSets Class Reference

#include <EquivSets.hpp>

Inheritance diagram for OA::Alias::EquivSets:
Inheritance graph
[legend]
Collaboration diagram for OA::Alias::EquivSets:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 EquivSets ()
 ~EquivSets ()
AliasResultType alias (MemRefHandle ref1, MemRefHandle ref2)
 indicate the aliasing relationship between two memory references
OA_ptr< LocIteratorgetMayLocs (MemRefHandle ref)
 iterator over locations that a memory reference may reference
OA_ptr< LocIteratorgetMustLocs (MemRefHandle ref)
OA_ptr< LocIteratorgetMayLocs (MemRefExpr &ref, ProcHandle proc)
 iterator over locations that a memory refer expression may reference
OA_ptr< LocIteratorgetMustLocs (MemRefExpr &ref, ProcHandle proc)
 iterator over locations that a memory refer expression may reference
OA_ptr< MemRefIteratorgetMemRefIter ()
void addLocation (OA_ptr< Location > pLoc, ProcHandle proc, int equivSet)
 associate the given location with the given procedure and equivSet
OA_ptr< LocIteratorgetLocIterator (ProcHandle proc, int equivSet)
 get iterator over all locations in a particular set
OA_ptr< std::map< int, OA_ptr
< LocSet > > > 
getIdToLocSetMap (ProcHandle proc)
 get the map from set it to location sets.
void mapMemRefToEquivSet (MemRefHandle ref, int equivSetId)
void mapMemRefToEquivSet (OA_ptr< MemRefExpr > ref, int setId)
 associate a MemRefExpr with the given equivSet,
void mapMemRefToProc (MemRefHandle ref, ProcHandle proc)
 associate a MemRefHandle with a given procedure
void mapAllToUnknown ()
void output (OA::IRHandlesIRInterface &ir)
void dump (std::ostream &os, OA_ptr< IRHandlesIRInterface > ir)

Static Public Attributes

static const int SET_ID_NONE = -1

Private Attributes

OUTPUT GENOUT std::map
< MemRefHandle, ProcHandle
mMemRefToProc
GENOUT std::map< MemRefHandle,
std::set< int > > 
mMemRefToSets
GENOUT std::map< ProcHandle,
std::map< int, std::set
< OA_ptr< Location > > > > 
mProcNSetToLocs
GENOUT std::map< OA_ptr
< MemRefExpr >, int > 
mMREToIdMap

Detailed Description

Not associated with a particular procedure. Just keeping track of may alias. Redesigned to be used with FIAlias. More general applicability in terms of storing results for other analysis algorithms is unknown.

Definition at line 66 of file EquivSets.hpp.


Constructor & Destructor Documentation

OA::Alias::EquivSets::EquivSets (  ) 

Definition at line 24 of file EquivSets.cpp.

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

OA::Alias::EquivSets::~EquivSets (  )  [inline]

Definition at line 69 of file EquivSets.hpp.


Member Function Documentation

void OA::Alias::EquivSets::addLocation ( OA_ptr< Location pLoc,
ProcHandle  proc,
int  equivSet 
)

associate the given location with the given procedure and equivSet

associate the given location with the given equivSet and procedure

Definition at line 132 of file EquivSets.cpp.

References mProcNSetToLocs.

Referenced by mapAllToUnknown().

AliasResultType OA::Alias::EquivSets::alias ( MemRefHandle  ref1,
MemRefHandle  ref2 
) [virtual]

indicate the aliasing relationship between two memory references

Implements OA::Alias::Interface.

Definition at line 30 of file EquivSets.cpp.

References OA::Alias::MAYALIAS, mMemRefToSets, and OA::Alias::NOALIAS.

void OA::Alias::EquivSets::dump ( std::ostream &  os,
OA_ptr< IRHandlesIRInterface ir 
)

incomplete output of info for debugging, just lists sets and text representation of mem refs

Definition at line 225 of file EquivSets.cpp.

References OA::IRHandle::hval(), and mMemRefToSets.

Here is the call graph for this function:

OA_ptr< std::map< int, OA_ptr< LocSet > > > OA::Alias::EquivSets::getIdToLocSetMap ( ProcHandle  proc  ) 

get the map from set it to location sets.

Definition at line 161 of file EquivSets.cpp.

References mProcNSetToLocs.

OA_ptr< LocIterator > OA::Alias::EquivSets::getLocIterator ( ProcHandle  proc,
int  equivSet 
)

get iterator over all locations in a particular set

Definition at line 138 of file EquivSets.cpp.

References mProcNSetToLocs, and OA::unionLocSets().

Here is the call graph for this function:

OA_ptr< LocIterator > OA::Alias::EquivSets::getMayLocs ( MemRefExpr ref,
ProcHandle  proc 
) [virtual]

iterator over locations that a memory refer expression may reference

Implements OA::Alias::Interface.

Definition at line 82 of file EquivSets.cpp.

References OA::MemRefExpr::clone(), mMREToIdMap, mProcNSetToLocs, and OA::unionLocSets().

Here is the call graph for this function:

OA_ptr< LocIterator > OA::Alias::EquivSets::getMayLocs ( MemRefHandle  ref  )  [virtual]

iterator over locations that a memory reference may reference

Implements OA::Alias::Interface.

Definition at line 50 of file EquivSets.cpp.

References mMemRefToProc, mMemRefToSets, mProcNSetToLocs, and OA::unionLocSets().

Here is the call graph for this function:

OA_ptr< MemRefIterator > OA::Alias::EquivSets::getMemRefIter (  )  [virtual]

get iterator over all memory references that alias information is available for

Implements OA::Alias::Interface.

Definition at line 110 of file EquivSets.cpp.

References mMemRefToSets.

Referenced by mapAllToUnknown().

OA_ptr< LocIterator > OA::Alias::EquivSets::getMustLocs ( MemRefExpr ref,
ProcHandle  proc 
) [virtual]

iterator over locations that a memory refer expression may reference

Implements OA::Alias::Interface.

Definition at line 100 of file EquivSets.cpp.

OA_ptr< LocIterator > OA::Alias::EquivSets::getMustLocs ( MemRefHandle  ref  )  [virtual]

iterator over locations that a memory reference must reference these locations will all have full static overlap

iterator over locations that a memory reference must reference these locations will all have full static overlap this data structure doesn't maintain must info

Implements OA::Alias::Interface.

Definition at line 73 of file EquivSets.cpp.

void OA::Alias::EquivSets::mapAllToUnknown (  ) 

if any of the EquivSets end up mapping to the UnknownLoc then all EquivSets must be merged

Definition at line 204 of file EquivSets.cpp.

References addLocation(), getMemRefIter(), mapMemRefToEquivSet(), mMemRefToProc, mMemRefToSets, and mProcNSetToLocs.

Here is the call graph for this function:

void OA::Alias::EquivSets::mapMemRefToEquivSet ( OA_ptr< MemRefExpr ref,
int  setId 
)

associate a MemRefExpr with the given equivSet,

associate a MemRefExpr with the given mapSet, means that the MemRefExpr can access all of the locations in the mapSet, if only one full location then is a must access

Definition at line 190 of file EquivSets.cpp.

References mMREToIdMap.

void OA::Alias::EquivSets::mapMemRefToEquivSet ( MemRefHandle  ref,
int  equivSetId 
)

associate a MemRefHandle with the given equivSet, means that the MemRefHandle can access all of the locations in the equivSet, a MemRefHandle can be mapped to more than one equiv set because it can be mapped to more than one MRE

associate a MemRefHandle with the given equivSet, means that the MemRefHandle can access all of the locations in the equivSet

Definition at line 184 of file EquivSets.cpp.

References mMemRefToSets.

Referenced by mapAllToUnknown().

void OA::Alias::EquivSets::mapMemRefToProc ( MemRefHandle  ref,
ProcHandle  proc 
)

associate a MemRefHandle with a given procedure

Definition at line 197 of file EquivSets.cpp.

References mMemRefToProc.

void OA::Alias::EquivSets::output ( OA::IRHandlesIRInterface ir  )  [virtual]

Implements OA::Annotation.

Definition at line 13 of file EquivSets_output.cpp.

References OA::int2string(), mMemRefToProc, mMemRefToSets, mProcNSetToLocs, and OA::Annotation::sOutBuild.

Here is the call graph for this function:


Member Data Documentation

OUTPUT GENOUT std::map<MemRefHandle,ProcHandle> OA::Alias::EquivSets::mMemRefToProc [private]

Definition at line 144 of file EquivSets.hpp.

Referenced by getMayLocs(), mapAllToUnknown(), mapMemRefToProc(), and output().

GENOUT std::map<MemRefHandle,std::set<int> > OA::Alias::EquivSets::mMemRefToSets [private]
GENOUT std::map<OA_ptr<MemRefExpr>,int> OA::Alias::EquivSets::mMREToIdMap [private]

Definition at line 157 of file EquivSets.hpp.

Referenced by getMayLocs(), and mapMemRefToEquivSet().

GENOUT std::map<ProcHandle,std::map<int,std::set<OA_ptr<Location> > > > OA::Alias::EquivSets::mProcNSetToLocs [private]
const int OA::Alias::EquivSets::SET_ID_NONE = -1 [static]

Definition at line 71 of file EquivSets.hpp.

Referenced by OA::Alias::ManagerNoAddressOf::performAnalysis().


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

Generated on Sat Oct 31 05:29:46 2009 for OpenAnalysis by  doxygen 1.6.1