#include <UnnamedLoc.hpp>


Public Member Functions | |
| UnnamedLoc (ExprHandle h, bool isLocal) | |
| UnnamedLoc (UnnamedLoc &other) | |
| copy constructor | |
| ~UnnamedLoc () | |
| void | acceptVisitor (LocationVisitor &pVisitor) |
| bool | isaUnnamed () |
| OA_ptr< Location > | getBaseLoc () |
| An UnnamedLoc returns itself as a base location. | |
| bool | isLocal () |
| bool | isUnique () |
| ExprHandle | getExprHandle () |
| bool | operator< (Location &other) |
| bool | operator== (Location &other) |
| indicate whether this location is semantically equivalent | |
| 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 | |
| ExprHandle | mExprHandle |
| bool | mLocal |
Static Private Attributes | |
| static const int | sOrder = 200 |
An unnamed location has a StmtHandle associated with it. Examples include statements that call malloc or new to allocate blocks of memory.
Definition at line 26 of file UnnamedLoc.hpp.
| OA::UnnamedLoc::UnnamedLoc | ( | ExprHandle | h, | |
| bool | isLocal | |||
| ) | [inline] |
Definition at line 28 of file UnnamedLoc.hpp.
Referenced by getBaseLoc().
| OA::UnnamedLoc::UnnamedLoc | ( | UnnamedLoc & | other | ) |
copy constructor
Definition at line 21 of file UnnamedLoc.cpp.
References OA::debug, and OA_DEBUG_CTRL_MACRO.
| OA::UnnamedLoc::~UnnamedLoc | ( | ) | [inline] |
Definition at line 34 of file UnnamedLoc.hpp.
| void OA::UnnamedLoc::acceptVisitor | ( | LocationVisitor & | pVisitor | ) | [virtual] |
Implements OA::Location.
Definition at line 27 of file UnnamedLoc.cpp.
References OA::LocationVisitor::visitUnnamedLoc().

| void OA::UnnamedLoc::dump | ( | std::ostream & | os | ) |
Definition at line 141 of file UnnamedLoc.cpp.
References OA::IRHandle::hval(), and mExprHandle.

| void OA::UnnamedLoc::dump | ( | std::ostream & | os, | |
| OA_ptr< IRHandlesIRInterface > | pIR | |||
| ) |
Definition at line 148 of file UnnamedLoc.cpp.
References OA::IRHandle::hval(), and mExprHandle.

An UnnamedLoc returns itself as a base location.
Implements OA::Location.
Definition at line 32 of file UnnamedLoc.cpp.
References UnnamedLoc().

| ExprHandle OA::UnnamedLoc::getExprHandle | ( | ) | [inline] |
Definition at line 56 of file UnnamedLoc.hpp.
References mExprHandle.
Referenced by operator<(), operator==(), and OA::UnnamedLocMayOverlapVisitor::visitUnnamedLoc().
| virtual int OA::UnnamedLoc::getOrder | ( | ) | [inline, virtual] |
Reimplemented from OA::Location.
Definition at line 83 of file UnnamedLoc.hpp.
References sOrder.
Referenced by operator<(), and operator==().
| bool OA::UnnamedLoc::isaUnnamed | ( | ) | [inline, virtual] |
Reimplemented from OA::Location.
Definition at line 41 of file UnnamedLoc.hpp.
| bool OA::UnnamedLoc::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 49 of file UnnamedLoc.hpp.
References mLocal.
Referenced by operator==().
| bool OA::UnnamedLoc::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 50 of file UnnamedLoc.hpp.
| bool OA::UnnamedLoc::mayOverlap | ( | Location & | other | ) | [virtual] |
Indicate whether this location may overlap with the given location either fully or partially.
Reimplemented from OA::Location.
Definition at line 106 of file UnnamedLoc.cpp.
References OA::Location::acceptVisitor(), and OA::UnnamedLocMayOverlapVisitor::mMayOverlap.

| bool OA::UnnamedLoc::mustOverlap | ( | Location & | other | ) | [virtual] |
Indicate whether this location must overlap fully with the given location.
Reimplemented from OA::Location.
Definition at line 114 of file UnnamedLoc.cpp.
| bool OA::UnnamedLoc::operator< | ( | Location & | other | ) | [virtual] |
Locations are ordered first between Location subclasses based on their sOrder value. Then there is an ordering within each subclass.
For UnnamedLoc the ordering is based on the ExprHandle.
Implements OA::Location.
Definition at line 46 of file UnnamedLoc.cpp.
References getExprHandle(), OA::Location::getOrder(), and getOrder().

| bool OA::UnnamedLoc::operator== | ( | Location & | other | ) | [virtual] |
indicate whether this location is semantically equivalent
Implements OA::Location.
Definition at line 59 of file UnnamedLoc.cpp.
References getExprHandle(), OA::Location::getOrder(), getOrder(), and isLocal().

| void OA::UnnamedLoc::output | ( | IRHandlesIRInterface & | ir | ) | [virtual] |
Implements OA::Annotation.
Definition at line 127 of file UnnamedLoc.cpp.
References OA::bool2string(), mExprHandle, mLocal, and OA::Annotation::sOutBuild.

| bool OA::UnnamedLoc::subSetOf | ( | Location & | other | ) | [virtual] |
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
Reimplemented from OA::Location.
Definition at line 122 of file UnnamedLoc.cpp.
| std::string OA::UnnamedLoc::toString | ( | OA_ptr< IRHandlesIRInterface > | pIR | ) | [virtual] |
ExprHandle OA::UnnamedLoc::mExprHandle [private] |
Definition at line 86 of file UnnamedLoc.hpp.
Referenced by dump(), getExprHandle(), output(), and toString().
bool OA::UnnamedLoc::mLocal [private] |
Definition at line 87 of file UnnamedLoc.hpp.
const int OA::UnnamedLoc::sOrder = 200 [static, private] |
Reimplemented from OA::Location.
Definition at line 89 of file UnnamedLoc.hpp.
Referenced by getOrder().
1.7.1