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

#include <ScalarizedRef.h>

Collaboration diagram for fortTkSupport::ScalarizedRef:
Collaboration graph

Public Member Functions

 ScalarizedRef (WN *const aWNp)
 
 ScalarizedRef (WN *const aWNp, const std::string &aPostFix)
 
virtual ~ScalarizedRef ()
 
const std::stringgetName () const
 
WNgetWN () const
 
unsigned int getId () const
 
void dump (std::ostream &o) const
 
void ddump () const
 

Static Public Member Functions

static bool isRefTranslatableToXAIF (const WN *wn)
 
static bool isRefSimple (const WN *wn)
 
static bool isRefSimpleScalar (const WN *wn)
 
static bool isRefSimpleArrayElem (const WN *wn)
 
static bool isRefSimpleArray (const WN *wn)
 
static bool isRefScalarizable (const WN *wn)
 
static bool isRefScalar (TY_IDX baseobj_ty, TY_IDX refobj_ty)
 

Private Member Functions

 ScalarizedRef (const ScalarizedRef &x)
 
ScalarizedRefoperator= (const ScalarizedRef &x)
 
void Ctor (WN *wn, const char *x)
 

Private Attributes

unsigned int myId
 
std::string myName
 
WNmyWNp
 

Static Private Attributes

static unsigned int ourNextId = 0
 
static const std::string ourPrefix
 

Detailed Description

this represents a scalarized reference i.e. a dummy variable that represents a (chain of) dereference

Definition at line 13 of file ScalarizedRef.h.

Constructor & Destructor Documentation

fortTkSupport::ScalarizedRef::ScalarizedRef ( WN *const  aWNp)

there may be no postfix string

Definition at line 15 of file ScalarizedRef.cxx.

References myId, myName, and ourPrefix.

fortTkSupport::ScalarizedRef::ScalarizedRef ( WN *const  aWNp,
const std::string aPostFix 
)

Definition at line 23 of file ScalarizedRef.cxx.

References myId, myName, and ourPrefix.

fortTkSupport::ScalarizedRef::~ScalarizedRef ( )
virtual

Definition at line 32 of file ScalarizedRef.cxx.

fortTkSupport::ScalarizedRef::ScalarizedRef ( const ScalarizedRef x)
private

no def

Member Function Documentation

void fortTkSupport::ScalarizedRef::Ctor ( WN wn,
const char *  x 
)
private
void fortTkSupport::ScalarizedRef::ddump ( ) const

Definition at line 51 of file ScalarizedRef.cxx.

References dump().

Here is the call graph for this function:

void fortTkSupport::ScalarizedRef::dump ( std::ostream &  o) const
unsigned int fortTkSupport::ScalarizedRef::getId ( ) const

Definition at line 43 of file ScalarizedRef.cxx.

References myId.

const std::string & fortTkSupport::ScalarizedRef::getName ( ) const
WN * fortTkSupport::ScalarizedRef::getWN ( ) const

Definition at line 39 of file ScalarizedRef.cxx.

References myWNp.

Referenced by whirl2xaif::xlate_ScalarizedRefTab().

bool fortTkSupport::ScalarizedRef::isRefScalar ( TY_IDX  baseobj_ty,
TY_IDX  refobj_ty 
)
static
bool fortTkSupport::ScalarizedRef::isRefScalarizable ( const WN wn)
static
bool fortTkSupport::ScalarizedRef::isRefSimple ( const WN wn)
static

WHIRL stores represent the lhs var-ref (e.g. OPR_ISTORE,OPR_STID)

Definition at line 59 of file ScalarizedRef.cxx.

References isRefSimpleArray(), isRefSimpleArrayElem(), and isRefSimpleScalar().

Referenced by isRefTranslatableToXAIF().

Here is the call graph for this function:

bool fortTkSupport::ScalarizedRef::isRefSimpleArray ( const WN wn)
static

Definition at line 116 of file ScalarizedRef.cxx.

References OPR_ARRAYEXP, OPR_ARRSECTION, OPR_LDA, OPR_LDID, OPR_LDMA, TY_Is_Array(), WN_GetBaseObjType(), WN_GetRefObjType(), and WN_operator().

Referenced by isRefSimple(), and whirl2xaif::xlate_SymRef().

Here is the call graph for this function:

bool fortTkSupport::ScalarizedRef::isRefSimpleArrayElem ( const WN wn)
static

Definition at line 93 of file ScalarizedRef.cxx.

References isRefScalar(), OPR_ARRAY, OPR_ILOAD, OPR_ISTORE, OPR_LDA, OPR_LDID, OPR_LDMA, OPR_STID, TY_Is_Array(), WN_GetBaseObjType(), WN_GetRefObjType(), and WN_operator().

Referenced by isRefSimple(), and whirl2xaif::xlate_SymRef().

Here is the call graph for this function:

bool fortTkSupport::ScalarizedRef::isRefSimpleScalar ( const WN wn)
static
bool fortTkSupport::ScalarizedRef::isRefTranslatableToXAIF ( const WN wn)
static

Returns whether 'wn' is a variable reference that can be translated into XAIF. 'wn' must be an expression; IOW it cannot be a store (=statement).

Definition at line 55 of file ScalarizedRef.cxx.

References isRefScalarizable(), and isRefSimple().

Referenced by xaif2whirl::XlateExpression::patchWNExpr().

Here is the call graph for this function:

ScalarizedRef& fortTkSupport::ScalarizedRef::operator= ( const ScalarizedRef x)
private

no def

Member Data Documentation

unsigned int fortTkSupport::ScalarizedRef::myId
private

Definition at line 68 of file ScalarizedRef.h.

Referenced by getId(), and ScalarizedRef().

std::string fortTkSupport::ScalarizedRef::myName
private

Definition at line 70 of file ScalarizedRef.h.

Referenced by dump(), getName(), and ScalarizedRef().

WN* fortTkSupport::ScalarizedRef::myWNp
private

the first occurance of the reference in PU

Definition at line 75 of file ScalarizedRef.h.

Referenced by getWN().

unsigned int fortTkSupport::ScalarizedRef::ourNextId = 0
staticprivate

to ensure global uniqueness

Definition at line 80 of file ScalarizedRef.h.

const std::string fortTkSupport::ScalarizedRef::ourPrefix
staticprivate

Definition at line 82 of file ScalarizedRef.h.

Referenced by ScalarizedRef().


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