OpenADFortTk (including Open64 and OpenAnalysis references)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
OA::UnnamedLoc Class Reference

#include <UnnamedLoc.hpp>

Inheritance diagram for OA::UnnamedLoc:
Inheritance graph
Collaboration diagram for OA::UnnamedLoc:
Collaboration graph

Public Member Functions

 UnnamedLoc (ExprHandle h, bool isLocal)
 
 UnnamedLoc (UnnamedLoc &other)
 copy constructor More...
 
 ~UnnamedLoc ()
 
void acceptVisitor (LocationVisitor &pVisitor)
 
bool isaUnnamed ()
 
OA_ptr< LocationgetBaseLoc ()
 An UnnamedLoc returns itself as a base location. More...
 
bool isLocal ()
 
bool isUnique ()
 
ExprHandle getExprHandle ()
 
bool operator< (Location &other)
 
bool operator== (Location &other)
 indicate whether this location is semantically equivalent More...
 
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 ()
 
- Public Member Functions inherited from OA::Location
 Location ()
 
 Location (Location &loc)
 
virtual ~Location ()
 
virtual bool isaNamed ()
 
virtual bool isaUnknown ()
 
virtual bool isaInvisible ()
 
virtual bool isaSubSet ()
 
virtual bool operator!= (Location &other)
 indicate whether this location is semantically equivalent More...
 
- Public Member Functions inherited from OA::Annotation
 Annotation ()
 
virtual ~Annotation ()
 

Private Attributes

ExprHandle mExprHandle
 
bool mLocal
 

Static Private Attributes

static const int sOrder = 200
 

Additional Inherited Members

- Static Public Member Functions inherited from OA::Annotation
static void configOutput (OA_ptr< OutputBuilder > ob)
 
- Static Protected Attributes inherited from OA::Annotation
static OA_ptr< OutputBuildersOutBuild
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Member Function Documentation

void OA::UnnamedLoc::acceptVisitor ( LocationVisitor pVisitor)
virtual

Implements OA::Location.

Definition at line 27 of file UnnamedLoc.cpp.

References OA::LocationVisitor::visitUnnamedLoc().

Here is the call graph for this function:

void OA::UnnamedLoc::dump ( std::ostream &  os)
virtual

Implements OA::Location.

Definition at line 141 of file UnnamedLoc.cpp.

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

Here is the call graph for this function:

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

Implements OA::Location.

Definition at line 148 of file UnnamedLoc.cpp.

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

Here is the call graph for this function:

OA_ptr< Location > OA::UnnamedLoc::getBaseLoc ( )
virtual

An UnnamedLoc returns itself as a base location.

Implements OA::Location.

Definition at line 32 of file UnnamedLoc.cpp.

References UnnamedLoc().

Here is the call graph for this function:

ExprHandle OA::UnnamedLoc::getExprHandle ( )
inline
virtual int OA::UnnamedLoc::getOrder ( )
inlinevirtual

Reimplemented from OA::Location.

Definition at line 83 of file UnnamedLoc.hpp.

References sOrder.

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

bool OA::UnnamedLoc::isaUnnamed ( )
inlinevirtual

Reimplemented from OA::Location.

Definition at line 41 of file UnnamedLoc.hpp.

bool OA::UnnamedLoc::isLocal ( )
inlinevirtual

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 ( )
inlinevirtual

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.

Here is the call graph for this function:

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(), getOrder(), and OA::Location::getOrder().

Here is the call graph for this function:

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(), getOrder(), OA::Location::getOrder(), and isLocal().

Here is the call graph for this function:

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.

Here is the call graph for this function:

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

Implements OA::Location.

Definition at line 156 of file UnnamedLoc.cpp.

References mExprHandle.

Member Data Documentation

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.

Referenced by isLocal(), and output().

const int OA::UnnamedLoc::sOrder = 200
staticprivate

Definition at line 89 of file UnnamedLoc.hpp.

Referenced by getOrder().


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