OA::InvisibleLoc Class Reference

#include <InvisibleLoc.hpp>

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

List of all members.

Public Member Functions

 InvisibleLoc (OA_ptr< MemRefExpr > mre)
 InvisibleLoc (InvisibleLoc &other)
 copy constructor
 ~InvisibleLoc ()
void acceptVisitor (LocationVisitor &pVisitor)
bool isaInvisible ()
OA_ptr< LocationgetBaseLoc ()
bool isLocal ()
bool isUnique ()
OA_ptr< MemRefExprgetMemRefExpr ()
SymHandle getBaseSym ()
bool operator< (Location &other)
bool operator== (Location &other)
bool mayOverlap (Location &other)
bool mustOverlap (Location &other)
bool subSetOf (Location &other)
void output (IRHandlesIRInterface &ir)
void dump (std::ostream &os)
void dump (std::ostream &os, OA_ptr< IRHandlesIRInterface > pIR)
std::string toString (OA_ptr< IRHandlesIRInterface > pIR)
virtual int getOrder ()

Private Attributes

OA_ptr< MemRefExprmMRE

Static Private Attributes

static const int sOrder = 300

Detailed Description

An invisible location involves a memory reference whose base is a param or non-local symbol. Invisible locations are used to summarize information within a procedure so that callers of that procedure can use the summarized information.

Definition at line 28 of file InvisibleLoc.hpp.


Constructor & Destructor Documentation

OA::InvisibleLoc::InvisibleLoc ( OA_ptr< MemRefExpr mre  )  [inline]

Definition at line 30 of file InvisibleLoc.hpp.

Referenced by getBaseLoc().

OA::InvisibleLoc::InvisibleLoc ( InvisibleLoc other  ) 

copy constructor

Definition at line 21 of file InvisibleLoc.cpp.

References OA::debug, mMRE, and OA_DEBUG_CTRL_MACRO.

OA::InvisibleLoc::~InvisibleLoc (  )  [inline]

Definition at line 35 of file InvisibleLoc.hpp.


Member Function Documentation

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

Implements OA::Location.

Definition at line 42 of file InvisibleLoc.cpp.

References OA::LocationVisitor::visitInvisibleLoc().

Here is the call graph for this function:

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

Definition at line 287 of file InvisibleLoc.cpp.

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

Here is the call graph for this function:

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

Definition at line 278 of file InvisibleLoc.cpp.

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

Here is the call graph for this function:

OA_ptr< Location > OA::InvisibleLoc::getBaseLoc (  )  [virtual]

An InvisibleLoc returns itself as a base location. It contains an MRE, not a sub location.

Implementation note: don't know whether base symbol of MemRefExpr is local or not so indicating it is not local (IOW visible in other procedures to be conservative.

Implements OA::Location.

Definition at line 55 of file InvisibleLoc.cpp.

References InvisibleLoc().

Here is the call graph for this function:

SymHandle OA::InvisibleLoc::getBaseSym (  ) 
OA_ptr<MemRefExpr> OA::InvisibleLoc::getMemRefExpr (  )  [inline]
virtual int OA::InvisibleLoc::getOrder (  )  [inline, virtual]

Reimplemented from OA::Location.

Definition at line 86 of file InvisibleLoc.hpp.

References sOrder.

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

bool OA::InvisibleLoc::isaInvisible (  )  [inline, virtual]

Reimplemented from OA::Location.

Definition at line 42 of file InvisibleLoc.hpp.

bool OA::InvisibleLoc::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 51 of file InvisibleLoc.hpp.

bool OA::InvisibleLoc::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 52 of file InvisibleLoc.hpp.

bool OA::InvisibleLoc::mayOverlap ( Location other  ) 

Definition at line 211 of file InvisibleLoc.cpp.

References OA::Location::acceptVisitor(), and OA::InvisibleLocMayOverlapVisitor::mMayOverlap.

Here is the call graph for this function:

bool OA::InvisibleLoc::mustOverlap ( Location other  ) 

Definition at line 250 of file InvisibleLoc.cpp.

References OA::Location::acceptVisitor(), and OA::InvisibleLocMustOverlapVisitor::mMustOverlap.

Referenced by subSetOf().

Here is the call graph for this function:

bool OA::InvisibleLoc::operator< ( Location other  ) 

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

For InvisibleLoc the ordering is based on the MRE.

Definition at line 88 of file InvisibleLoc.cpp.

References getMemRefExpr(), OA::Location::getOrder(), and getOrder().

Here is the call graph for this function:

bool OA::InvisibleLoc::operator== ( Location other  ) 

Definition at line 101 of file InvisibleLoc.cpp.

References getMemRefExpr(), OA::Location::getOrder(), and getOrder().

Here is the call graph for this function:

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

Implements OA::Annotation.

Definition at line 267 of file InvisibleLoc.cpp.

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

bool OA::InvisibleLoc::subSetOf ( Location other  ) 

conservatively answers this question, if we may overlap with the other location but don't must overlap then we may or may not be a subset so we just return false FIXME

Definition at line 262 of file InvisibleLoc.cpp.

References mustOverlap().

Here is the call graph for this function:

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

Implements OA::Location.

Definition at line 295 of file InvisibleLoc.cpp.

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

Here is the call graph for this function:


Member Data Documentation

Definition at line 89 of file InvisibleLoc.hpp.

Referenced by dump(), getBaseSym(), getMemRefExpr(), InvisibleLoc(), output(), and toString().

const int OA::InvisibleLoc::sOrder = 300 [static, private]

Reimplemented from OA::Location.

Definition at line 91 of file InvisibleLoc.hpp.

Referenced by getOrder().


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

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