#include <NamedLoc.hpp>


A named location has a SymHandle associated with it. Examples include local and global variables.
Definition at line 25 of file NamedLoc.hpp.
| OA::NamedLoc::NamedLoc | ( | SymHandle | sh, | |
| bool | isLocal | |||
| ) | [inline] |
Definition at line 27 of file NamedLoc.hpp.
Referenced by getBaseLoc().
| OA::NamedLoc::NamedLoc | ( | NamedLoc & | other | ) |
copy constructor
Definition at line 22 of file NamedLoc.cpp.
References OA::debug, mFullOverlap, mPartOverlap, and OA_DEBUG_CTRL_MACRO.
| OA::NamedLoc::~NamedLoc | ( | ) | [inline] |
Definition at line 33 of file NamedLoc.hpp.
| void OA::NamedLoc::acceptVisitor | ( | LocationVisitor & | pVisitor | ) | [virtual] |
Implements OA::Location.
Definition at line 35 of file NamedLoc.cpp.
References OA::LocationVisitor::visitNamedLoc().

| void OA::NamedLoc::addFullOverlap | ( | SymHandle | s | ) | [inline] |
Definition at line 35 of file NamedLoc.hpp.
References mFullOverlap.
| void OA::NamedLoc::addPartOverlap | ( | SymHandle | s | ) | [inline] |
Definition at line 36 of file NamedLoc.hpp.
References mPartOverlap.
| void OA::NamedLoc::dump | ( | std::ostream & | os, | |
| OA_ptr< IRHandlesIRInterface > | pIR | |||
| ) |
Definition at line 280 of file NamedLoc.cpp.
References OA::IRHandle::hval(), mLocal, and mSymHandle.

| void OA::NamedLoc::dump | ( | std::ostream & | os | ) |
Definition at line 273 of file NamedLoc.cpp.
References OA::IRHandle::hval(), mLocal, and mSymHandle.
Referenced by operator<(), operator==(), and OA::DataFlow::CalleeToCallerVisitor::visitNamedLoc().

A NamedLoc returns itself as a base location.
Implements OA::Location.
Definition at line 40 of file NamedLoc.cpp.
References NamedLoc().

| OA_ptr< SymHandleIterator > OA::NamedLoc::getFullOverlapIter | ( | ) |
Definition at line 56 of file NamedLoc.cpp.
References mFullOverlap.
| virtual int OA::NamedLoc::getOrder | ( | ) | [inline, virtual] |
Reimplemented from OA::Location.
Definition at line 84 of file NamedLoc.hpp.
References sOrder.
Referenced by operator<(), and operator==().
| OA_ptr< SymHandleIterator > OA::NamedLoc::getPartOverlapIter | ( | ) |
Definition at line 47 of file NamedLoc.cpp.
References mPartOverlap.
| SymHandle OA::NamedLoc::getSymHandle | ( | ) | [inline] |
Definition at line 53 of file NamedLoc.hpp.
References mSymHandle.
Referenced by operator<(), operator==(), OA::NamedLocMustOverlapVisitor::visitNamedLoc(), OA::NamedLocMayOverlapVisitor::visitNamedLoc(), OA::SideEffect::VisibleVisitor::visitNamedLoc(), OA::DUG::depLocVisitor::visitNamedLoc(), and OA::DUG::IndepLocVisitor::visitNamedLoc().
| bool OA::NamedLoc::isaNamed | ( | ) | [inline, virtual] |
Reimplemented from OA::Location.
Definition at line 43 of file NamedLoc.hpp.
| bool OA::NamedLoc::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 NamedLoc.hpp.
References mLocal.
Referenced by operator==(), and OA::DataFlow::CalleeToCallerVisitor::visitNamedLoc().
| bool OA::NamedLoc::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 NamedLoc.hpp.
| bool OA::NamedLoc::mayOverlap | ( | Location & | other | ) |
Definition at line 177 of file NamedLoc.cpp.
References OA::Location::acceptVisitor(), and OA::NamedLocMayOverlapVisitor::mMayOverlap.

| bool OA::NamedLoc::mustOverlap | ( | Location & | other | ) |
Definition at line 220 of file NamedLoc.cpp.
References OA::Location::acceptVisitor(), and OA::NamedLocMustOverlapVisitor::mMustOverlap.
Referenced by subSetOf().

| bool OA::NamedLoc::operator< | ( | Location & | other | ) |
Locations are ordered first between Location subclasses based on their sOrder value. Then there is an ordering within each subclass.
For NamedLoc the ordering is based on the SymHandle.
Note: this could cause a problem if consider two NamedLoc's equiv if they must overlap.
Definition at line 75 of file NamedLoc.cpp.
References OA::debug, OA::Location::dump(), dump(), OA::Location::getOrder(), getOrder(), and getSymHandle().

| bool OA::NamedLoc::operator== | ( | Location & | other | ) |
only semantically equivalent to another NamedLoc
Definition at line 96 of file NamedLoc.cpp.
References OA::debug, OA::Location::dump(), dump(), OA::Location::getOrder(), getOrder(), getSymHandle(), and isLocal().

| void OA::NamedLoc::output | ( | IRHandlesIRInterface & | ir | ) | [virtual] |
Implements OA::Annotation.
Definition at line 239 of file NamedLoc.cpp.
References OA::bool2string(), mFullOverlap, mLocal, mPartOverlap, mSymHandle, and OA::Annotation::sOutBuild.

| bool OA::NamedLoc::staticFullOverlap | ( | SymHandle | sym | ) |
Definition at line 117 of file NamedLoc.cpp.
References mFullOverlap.
Referenced by OA::NamedLocMustOverlapVisitor::visitNamedLoc(), and OA::NamedLocMayOverlapVisitor::visitNamedLoc().
| bool OA::NamedLoc::staticPartOverlap | ( | SymHandle | sym | ) |
Definition at line 126 of file NamedLoc.cpp.
References mPartOverlap.
Referenced by OA::NamedLocMayOverlapVisitor::visitNamedLoc().
| bool OA::NamedLoc::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: some analyses may want to use this conservatively the other way, in other words, checking if it is not a subset?
Definition at line 234 of file NamedLoc.cpp.
References mustOverlap().

| std::string OA::NamedLoc::toString | ( | OA_ptr< IRHandlesIRInterface > | pIR | ) | [virtual] |
Implements OA::Location.
Definition at line 289 of file NamedLoc.cpp.
References OA::IRHandle::hval(), and mSymHandle.

std::set<SymHandle> OA::NamedLoc::mFullOverlap [private] |
Definition at line 92 of file NamedLoc.hpp.
Referenced by addFullOverlap(), getFullOverlapIter(), NamedLoc(), output(), and staticFullOverlap().
bool OA::NamedLoc::mLocal [private] |
Definition at line 89 of file NamedLoc.hpp.
std::set<SymHandle> OA::NamedLoc::mPartOverlap [private] |
Definition at line 93 of file NamedLoc.hpp.
Referenced by addPartOverlap(), getPartOverlapIter(), NamedLoc(), output(), and staticPartOverlap().
SymHandle OA::NamedLoc::mSymHandle [private] |
Definition at line 87 of file NamedLoc.hpp.
Referenced by dump(), getSymHandle(), output(), and toString().
const int OA::NamedLoc::sOrder = 100 [static, private] |
Reimplemented from OA::Location.
Definition at line 95 of file NamedLoc.hpp.
Referenced by getOrder().
1.6.1