OpenADFortTk (including Open64 and OpenAnalysis references)
|
#include <ScalarizedRef.h>
Public Member Functions | |
ScalarizedRef (WN *const aWNp) | |
ScalarizedRef (WN *const aWNp, const std::string &aPostFix) | |
virtual | ~ScalarizedRef () |
const std::string & | getName () const |
WN * | getWN () 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) | |
ScalarizedRef & | operator= (const ScalarizedRef &x) |
void | Ctor (WN *wn, const char *x) |
Private Attributes | |
unsigned int | myId |
std::string | myName |
WN * | myWNp |
Static Private Attributes | |
static unsigned int | ourNextId = 0 |
static const std::string | ourPrefix |
this represents a scalarized reference i.e. a dummy variable that represents a (chain of) dereference
Definition at line 13 of file ScalarizedRef.h.
fortTkSupport::ScalarizedRef::ScalarizedRef | ( | WN *const | aWNp) |
there may be no postfix string
Definition at line 15 of file ScalarizedRef.cxx.
fortTkSupport::ScalarizedRef::ScalarizedRef | ( | WN *const | aWNp, |
const std::string & | aPostFix | ||
) |
Definition at line 23 of file ScalarizedRef.cxx.
|
virtual |
Definition at line 32 of file ScalarizedRef.cxx.
|
private |
no def
|
private |
void fortTkSupport::ScalarizedRef::ddump | ( | ) | const |
Definition at line 51 of file ScalarizedRef.cxx.
References dump().
void fortTkSupport::ScalarizedRef::dump | ( | std::ostream & | o) | const |
Definition at line 47 of file ScalarizedRef.cxx.
References myName.
Referenced by ddump(), and fortTkSupport::ScalarizedRefTab< ScalarizedRefTab_Base::W2X >::DumpFmt().
unsigned int fortTkSupport::ScalarizedRef::getId | ( | ) | const |
Definition at line 43 of file ScalarizedRef.cxx.
References myId.
const std::string & fortTkSupport::ScalarizedRef::getName | ( | ) | const |
Definition at line 35 of file ScalarizedRef.cxx.
References myName.
Referenced by fortTkSupport::AddToScalarizedRefTabOp::operator()(), whirl2xaif::xlate_MemRef(), whirl2xaif::xlate_ScalarizedRefTab(), and whirl2xaif::xlate_SymRef().
WN * fortTkSupport::ScalarizedRef::getWN | ( | ) | const |
Definition at line 39 of file ScalarizedRef.cxx.
References myWNp.
Referenced by whirl2xaif::xlate_ScalarizedRefTab().
Definition at line 188 of file ScalarizedRef.cxx.
References TY_Is_Scalar(), TY_IsNonScalar(), and WN2F_Can_Assign_Types().
Referenced by isRefScalarizable(), isRefSimpleArrayElem(), isRefSimpleScalar(), whirl2xaif::xlate_MemRef(), and whirl2xaif::xlate_SymRef().
|
static |
Definition at line 136 of file ScalarizedRef.cxx.
References FORTTK_MSG, isRefScalar(), OPERATOR_name(), OPR_ILOAD, OPR_ISTORE, OPR_LDA, OPR_LDBITS, OPR_LDID, OPR_LDMA, OPR_STBITS, OPR_STID, OPR_STRCTFLD, TY_IDX_index(), TY_Is_Array(), TY_Is_Pointer(), TY_Is_Scalar(), TY_pointed(), WN_GetBaseObjType(), WN_GetRefObjType(), WN_kid0(), WN_operator(), and WN_ty().
Referenced by fortTkSupport::ForAllScalarizableRefs(), and isRefTranslatableToXAIF().
|
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().
|
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().
|
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().
|
static |
Definition at line 67 of file ScalarizedRef.cxx.
References isRefScalar(), OPR_ILDBITS, OPR_ILOAD, OPR_LDA, OPR_LDBITS, OPR_LDID, OPR_LDMA, OPR_STBITS, OPR_STID, TY_pointed(), WN_GetBaseObjType(), WN_GetRefObjType(), and WN_operator().
Referenced by isRefSimple(), whirl2xaif::xlate_MemRef(), and whirl2xaif::xlate_SymRef().
|
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().
|
private |
no def
|
private |
Definition at line 68 of file ScalarizedRef.h.
Referenced by getId(), and ScalarizedRef().
|
private |
Definition at line 70 of file ScalarizedRef.h.
Referenced by dump(), getName(), and ScalarizedRef().
|
private |
the first occurance of the reference in PU
Definition at line 75 of file ScalarizedRef.h.
Referenced by getWN().
|
staticprivate |
to ensure global uniqueness
Definition at line 80 of file ScalarizedRef.h.
|
staticprivate |
Definition at line 82 of file ScalarizedRef.h.
Referenced by ScalarizedRef().