OA::LocSubSet Class Reference

#include <LocSubSet.hpp>

Inheritance diagram for OA::LocSubSet:
Inheritance graph
[legend]
Collaboration diagram for OA::LocSubSet:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 LocSubSet (OA_ptr< Location > baseLoc)
 LocSubSet (OA_ptr< Location > baseLoc, bool full)
 LocSubSet (LocSubSet &other)
 copy constructor
virtual ~LocSubSet ()
virtual void acceptVisitor (LocationVisitor &pVisitor)
bool isaSubSet ()
bool isSubClassOfLocSubSet ()
virtual bool isaIdxSubSet ()
virtual bool isaFieldSubSet ()
OA_ptr< LocationgetBaseLoc ()
 LocSubSets will return the location for which they indicate subsetting.
OA_ptr< LocationgetLoc ()
virtual bool isFull ()
 something useful to have for all LocSubSet's
bool isLocal ()
bool isUnique ()
virtual bool operator< (Location &other)
virtual bool operator== (Location &other)
virtual bool mayOverlap (Location &other)
virtual bool mustOverlap (Location &other)
virtual bool subSetOf (Location &other)
void dump (std::ostream &os)
void dump (std::ostream &os, OA_ptr< IRHandlesIRInterface > pIR)
std::string toString (OA_ptr< IRHandlesIRInterface > pIR)
void output (IRHandlesIRInterface &ir)
virtual int getOrder ()

Protected Attributes

OA_ptr< LocationmLoc

Private Member Functions

void composeWithBaseLoc (OA_ptr< Location > baseLoc)
 helper function for constructor

Private Attributes

bool mFull

Static Private Attributes

static const int sOrder = 600

Detailed Description

The LocSubSet implements a decorator pattern for locations. If we decorate a location with a LocSubSet that represents some subset of the location depending on what subset abstraction is being used. Many subset abstractions are possible.

Definition at line 27 of file LocSubSet.hpp.


Constructor & Destructor Documentation

OA::LocSubSet::LocSubSet ( OA_ptr< Location baseLoc  ) 

Definition at line 21 of file LocSubSet.cpp.

References composeWithBaseLoc(), OA::debug, and OA_DEBUG_CTRL_MACRO.

Here is the call graph for this function:

OA::LocSubSet::LocSubSet ( OA_ptr< Location baseLoc,
bool  full 
)

Definition at line 30 of file LocSubSet.cpp.

References composeWithBaseLoc().

Here is the call graph for this function:

OA::LocSubSet::LocSubSet ( LocSubSet other  )  [inline]

copy constructor

Definition at line 33 of file LocSubSet.hpp.

virtual OA::LocSubSet::~LocSubSet (  )  [inline, virtual]

Definition at line 35 of file LocSubSet.hpp.


Member Function Documentation

void OA::LocSubSet::acceptVisitor ( LocationVisitor pVisitor  )  [virtual]

Implements OA::Location.

Reimplemented in OA::LocFieldSubSet, and OA::LocIdxSubSet.

Definition at line 56 of file LocSubSet.cpp.

References OA::LocationVisitor::visitLocSubSet().

Here is the call graph for this function:

void OA::LocSubSet::composeWithBaseLoc ( OA_ptr< Location baseLoc  )  [private]

helper function for constructor

If the given location is a subset then we will be subset of the baseLoc's base location. This method also has logic for determining what our accuracy should be based on our initially specified accuracy and the accuracy of baseLoc

Definition at line 43 of file LocSubSet.cpp.

References mLoc.

Referenced by LocSubSet().

void OA::LocSubSet::dump ( std::ostream &  os,
OA_ptr< IRHandlesIRInterface pIR 
)

Reimplemented in OA::LocFieldSubSet, and OA::LocIdxSubSet.

Definition at line 190 of file LocSubSet.cpp.

References OA::OA_ptr< T >::dump(), getLoc(), and isFull().

Here is the call graph for this function:

void OA::LocSubSet::dump ( std::ostream &  os  ) 

Reimplemented in OA::LocFieldSubSet, and OA::LocIdxSubSet.

Definition at line 182 of file LocSubSet.cpp.

References OA::OA_ptr< T >::dump(), getLoc(), and isFull().

Here is the call graph for this function:

OA_ptr<Location> OA::LocSubSet::getBaseLoc (  )  [inline, virtual]

LocSubSets will return the location for which they indicate subsetting.

Implements OA::Location.

Definition at line 59 of file LocSubSet.hpp.

References mLoc.

Referenced by OA::DUG::depLocVisitor::visitLocSubSet(), and OA::DUG::IndepLocVisitor::visitLocSubSet().

OA_ptr<Location> OA::LocSubSet::getLoc (  )  [inline]
virtual int OA::LocSubSet::getOrder (  )  [inline, virtual]

Reimplemented from OA::Location.

Reimplemented in OA::LocFieldSubSet, and OA::LocIdxSubSet.

Definition at line 95 of file LocSubSet.hpp.

References sOrder.

Referenced by operator<(), and operator==().

virtual bool OA::LocSubSet::isaFieldSubSet (  )  [inline, virtual]

Reimplemented in OA::LocFieldSubSet.

Definition at line 53 of file LocSubSet.hpp.

Referenced by isSubClassOfLocSubSet().

virtual bool OA::LocSubSet::isaIdxSubSet (  )  [inline, virtual]

Reimplemented in OA::LocIdxSubSet.

Definition at line 52 of file LocSubSet.hpp.

Referenced by isSubClassOfLocSubSet().

bool OA::LocSubSet::isaSubSet (  )  [inline, virtual]

Reimplemented from OA::Location.

Definition at line 42 of file LocSubSet.hpp.

Referenced by OA::Activity::ManagerICFGUseful::callerToCallee().

virtual bool OA::LocSubSet::isFull (  )  [inline, virtual]

something useful to have for all LocSubSet's

Reimplemented in OA::LocFieldSubSet, and OA::LocIdxSubSet.

Definition at line 64 of file LocSubSet.hpp.

References mFull.

Referenced by dump(), OA::LocSubSetMustOverlapVisitor::fullAndLocMustOverlap(), operator<(), operator==(), and toString().

bool OA::LocSubSet::isLocal (  )  [inline, virtual]

true if the location block represents a local variable that is only visible within the current procedure or an unnamed variable that is allocated in the current procedure. If the current procedure is nested and has access to local variables of a parent procedure, those variables are not considered local for the current procedure.

Reimplemented from OA::Location.

Definition at line 66 of file LocSubSet.hpp.

References mLoc, and OA::OA_ptr< T >::ptrEqual().

Here is the call graph for this function:

bool OA::LocSubSet::isSubClassOfLocSubSet (  )  [inline]

This needs to be logical OR of all isa methods below it If a direct instance of this class then will return false

Definition at line 49 of file LocSubSet.hpp.

References isaFieldSubSet(), and isaIdxSubSet().

Here is the call graph for this function:

bool OA::LocSubSet::isUnique (  )  [inline, virtual]

be because there could be multiple allocations at the same statement and they maybe lumped together depending on how much context is maintained. A LocBlock for an unnamed allocated memory block could be Unique if there is a different LocBlock for each possible context of the alloc. A local variable is always unique, allocated memory blocks may

Reimplemented from OA::Location.

Definition at line 68 of file LocSubSet.hpp.

References mLoc, and OA::OA_ptr< T >::ptrEqual().

Here is the call graph for this function:

bool OA::LocSubSet::mayOverlap ( Location other  )  [virtual]
bool OA::LocSubSet::mustOverlap ( Location other  )  [virtual]
bool OA::LocSubSet::operator< ( Location other  )  [virtual]

Locations are ordered first between Location subclasses based on their sOrder value. Then there is an ordering within each subclass.

When comparing between direct instances of LocSubSet's will first compare base locations and will then let FULL < PARTIAL.

Reimplemented in OA::LocFieldSubSet, and OA::LocIdxSubSet.

Definition at line 81 of file LocSubSet.cpp.

References getLoc(), OA::Location::getOrder(), getOrder(), and isFull().

Here is the call graph for this function:

bool OA::LocSubSet::operator== ( Location other  )  [virtual]

Reimplemented in OA::LocFieldSubSet, and OA::LocIdxSubSet.

Definition at line 99 of file LocSubSet.cpp.

References getLoc(), OA::Location::getOrder(), getOrder(), and isFull().

Here is the call graph for this function:

void OA::LocSubSet::output ( IRHandlesIRInterface ir  )  [virtual]

Implements OA::Annotation.

Reimplemented in OA::LocFieldSubSet, and OA::LocIdxSubSet.

Definition at line 61 of file LocSubSet.cpp.

References OA::bool2string(), mFull, mLoc, and OA::Annotation::sOutBuild.

Here is the call graph for this function:

bool OA::LocSubSet::subSetOf ( Location other  )  [virtual]

Reimplemented in OA::LocFieldSubSet, and OA::LocIdxSubSet.

Definition at line 169 of file LocSubSet.cpp.

References getLoc(), and mustOverlap().

Here is the call graph for this function:

std::string OA::LocSubSet::toString ( OA_ptr< IRHandlesIRInterface pIR  )  [virtual]

Implements OA::Location.

Reimplemented in OA::LocFieldSubSet, and OA::LocIdxSubSet.

Definition at line 198 of file LocSubSet.cpp.

References getLoc(), and isFull().

Here is the call graph for this function:


Member Data Documentation

bool OA::LocSubSet::mFull [private]

Definition at line 102 of file LocSubSet.hpp.

Referenced by isFull(), and output().

const int OA::LocSubSet::sOrder = 600 [static, private]

Reimplemented from OA::Location.

Reimplemented in OA::LocFieldSubSet, and OA::LocIdxSubSet.

Definition at line 107 of file LocSubSet.hpp.

Referenced by getOrder().


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

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