|
OpenADFortTk (basic)
|
#include <XlationContext.h>
Public Types | |
| enum | Flags_E { NOFLAG = 0x00000000, ASSIGN = 0x00000001, VARREF = 0x00000002, DEREF_ADDR = 0x00000004, HAS_LOGICAL_ARG = 0x00000200, IS_LOGICAL_ARG = 0x00000400, IS_LOGICAL_OPERATION = 0x00000800, IO_STMT = 0x00004000, DEREF_IO_ITEM = 0x00008000, ORIGFMT_IOCTRL = 0x00010000, FMT_IO = 0x00020000, CRAY_IO = 0x00040000, HAS_NO_ARR_ELMT = 0x00200000 } |
Public Member Functions | |
| XlationContext (unsigned int aStackPosition=0) | |
| ~XlationContext () | |
| WN * | getWN () const |
| bool | hasWN () const |
| void | setWN (WN *aWNp) |
| unsigned int | getNewVertexId () |
| unsigned int | getVertexId () const |
| unsigned int | peekVertexId () const |
| unsigned int | getNewEdgeId () |
| unsigned int | getEdgeId () const |
| unsigned int | peekEdgeId () const |
| std::string | toString () const |
| void | dump (std::ostream &o, const std::string &indent) const |
| void | ddump () const |
| bool | isFlag (Flags_E f) const |
| void | setFlag (Flags_E f) |
| void | unsetFlag (Flags_E f) |
| void | inheritFlags (const XlationContext &parentContext) |
Static Public Member Functions | |
| static std::string | flagToString (Flags_E aFlag) |
Private Attributes | |
| WN * | myWNp |
| unsigned int | myNextVertexId |
| unsigned int | myNextEdgeId |
| unsigned int | myFlags |
| unsigned int | myStackPosition |
XlationContext for whirl2xaif: Represents information about a WHIRL->XAIF translation context. Designed to contain information about a particular level. Contained in a stack in PUXlationContext.
Definition at line 26 of file XlationContext.h.
| NOFLAG | |
| ASSIGN | |
| VARREF | |
| DEREF_ADDR | |
| HAS_LOGICAL_ARG | |
| IS_LOGICAL_ARG | |
| IS_LOGICAL_OPERATION | |
| IO_STMT | |
| DEREF_IO_ITEM | |
| ORIGFMT_IOCTRL | |
| FMT_IO | |
| CRAY_IO | |
| HAS_NO_ARR_ELMT |
Definition at line 73 of file XlationContext.h.
| whirl2xaif::XlationContext::XlationContext | ( | unsigned int | aStackPosition = 0 | ) |
Definition at line 12 of file XlationContext.cxx.
Definition at line 20 of file XlationContext.cxx.
| void whirl2xaif::XlationContext::ddump | ( | ) | const |
Definition at line 165 of file XlationContext.cxx.
References dump().

| void whirl2xaif::XlationContext::dump | ( | std::ostream & | o, |
| const std::string & | indent | ||
| ) | const |
Definition at line 160 of file XlationContext.cxx.
References toString().
Referenced by ddump().

| std::string whirl2xaif::XlationContext::flagToString | ( | XlationContext::Flags_E | aFlag | ) | [static] |
Definition at line 92 of file XlationContext.cxx.
References ASSIGN, CRAY_IO, DEREF_ADDR, DEREF_IO_ITEM, FMT_IO, FORTTK_DIE, HAS_LOGICAL_ARG, HAS_NO_ARR_ELMT, IO_STMT, IS_LOGICAL_ARG, IS_LOGICAL_OPERATION, NOFLAG, ORIGFMT_IOCTRL, and VARREF.
Referenced by setFlag(), toString(), and unsetFlag().
| unsigned int whirl2xaif::XlationContext::getEdgeId | ( | ) | const |
return current id, 0 is considered invalid
Definition at line 59 of file XlationContext.cxx.
References FORTTK_DIE, and myNextEdgeId.
| unsigned int whirl2xaif::XlationContext::getNewEdgeId | ( | ) |
regular use
Definition at line 55 of file XlationContext.cxx.
References myNextEdgeId.
Referenced by whirl2xaif::Whirl2Xaif::translateScopeHierarchyPU(), whirl2xaif::WN2F_arrsection(), WN2F_Intr_Funcall(), whirl2xaif::WN2F_String_Argument(), whirl2xaif::xlate_ARRAY(), xlate_BinaryOpUsingIntrinsicTable(), whirl2xaif::xlate_CALL(), and whirl2xaif::xlate_FUNC_ENTRY().
| unsigned int whirl2xaif::XlationContext::getNewVertexId | ( | ) |
regular use
Definition at line 41 of file XlationContext.cxx.
References myNextVertexId.
Referenced by whirl2xaif::TY2F_Append_ARB(), whirl2xaif::TY2F_array(), whirl2xaif::TY2F_scalar(), whirl2xaif::WN2F_arrsection(), whirl2xaif::WN2F_Arrsection_Slots(), WN2F_Intr_Funcall(), WN2F_ios_inquire(), whirl2xaif::WN2F_String_Argument(), whirl2xaif::WN2F_Substring(), whirl2xaif::xlate_ARRAY(), whirl2xaif::xlate_ArrayIndices(), xlate_BinaryOpUsingIntrinsicTable(), whirl2xaif::xlate_CALL(), whirl2xaif::xlate_CONST(), whirl2xaif::xlate_INTCONST(), whirl2xaif::xlate_MemRef(), whirl2xaif::xlate_PregRef(), whirl2xaif::xlate_STUse_BLOCK(), whirl2xaif::xlate_STUse_CONST(), whirl2xaif::xlate_STUse_VAR(), and whirl2xaif::xlate_SymRef().
| unsigned int whirl2xaif::XlationContext::getVertexId | ( | ) | const |
return current id, 0 is considered invalid
Definition at line 45 of file XlationContext.cxx.
References FORTTK_DIE, and myNextVertexId.
Referenced by xlate_BinaryOpUsingIntrinsicTable().
| WN * whirl2xaif::XlationContext::getWN | ( | ) | const |
Definition at line 23 of file XlationContext.cxx.
References FORTTK_DIE, and myWNp.
Referenced by whirl2xaif::xlate_CALL().
| bool whirl2xaif::XlationContext::hasWN | ( | ) | const |
Definition at line 29 of file XlationContext.cxx.
References myWNp.
Referenced by whirl2xaif::xlate_CALL().
| void whirl2xaif::XlationContext::inheritFlags | ( | const XlationContext & | parentContext | ) |
Definition at line 87 of file XlationContext.cxx.
References ASSIGN, HAS_NO_ARR_ELMT, myFlags, and VARREF.
Referenced by whirl2xaif::PUXlationContext::PushNewXlationContext().
| bool whirl2xaif::XlationContext::isFlag | ( | XlationContext::Flags_E | f | ) | const |
Definition at line 69 of file XlationContext.cxx.
References myFlags.
Referenced by toString(), whirl2xaif::TranslateWN(), whirl2xaif::WN2F_arrsection(), whirl2xaif::WN2F_implied_do(), whirl2xaif::WN2F_parm(), whirl2xaif::WN2F_String_Argument(), whirl2xaif::xlate_ARRAY(), whirl2xaif::xlate_CONST(), whirl2xaif::xlate_INTCONST(), whirl2xaif::xlate_IO_ITEM(), xlate_IO_ITEM_format(), xlate_IO_ITEM_list(), whirl2xaif::xlate_ISTORE(), whirl2xaif::xlate_LDID(), whirl2xaif::xlate_MemRef(), whirl2xaif::xlate_PregRef(), whirl2xaif::xlate_STID(), and whirl2xaif::xlate_SymRef().
| unsigned int whirl2xaif::XlationContext::peekEdgeId | ( | ) | const |
return a peek of the next id
Definition at line 65 of file XlationContext.cxx.
References myNextEdgeId.
| unsigned int whirl2xaif::XlationContext::peekVertexId | ( | ) | const |
return a peek of the next id
Definition at line 51 of file XlationContext.cxx.
References myNextVertexId.
Referenced by whirl2xaif::WN2F_arrsection(), WN2F_Intr_Funcall(), whirl2xaif::WN2F_String_Argument(), whirl2xaif::xlate_ARRAY(), xlate_BinaryOpUsingIntrinsicTable(), and whirl2xaif::xlate_CALL().
Definition at line 72 of file XlationContext.cxx.
References flagToString(), FORTTK_MSG, myFlags, and toString().
Referenced by whirl2xaif::PUXlationContext::PushNewXlationContext(), whirl2xaif::TranslateWN(), WN2F_Intr_Funcall(), WN2F_ios_cr(), WN2F_ios_decode(), WN2F_ios_definefile(), WN2F_ios_encode(), WN2F_ios_read(), whirl2xaif::WN2F_parm(), whirl2xaif::WN2F_pstid(), whirl2xaif::WN2F_pstore(), whirl2xaif::WN2F_String_Argument(), whirl2xaif::xlate_CALL(), whirl2xaif::xlate_ILOAD(), whirl2xaif::xlate_IO(), whirl2xaif::xlate_IO_ITEM(), xlate_IO_ITEM_control(), xlate_IO_ITEM_format(), xlate_IO_ITEM_list(), xlate_IO_ITEM_unit(), whirl2xaif::xlate_ISTORE(), whirl2xaif::xlate_LDA(), whirl2xaif::xlate_LDID(), whirl2xaif::xlate_MemRef(), and whirl2xaif::xlate_STID().

| void whirl2xaif::XlationContext::setWN | ( | WN * | aWNp | ) |
Definition at line 33 of file XlationContext.cxx.
References FORTTK_DIE, FORTTK_MSG, and myWNp.
Referenced by whirl2xaif::PUXlationContext::PushNewXlationContext(), whirl2xaif::xlate_CALL(), whirl2xaif::xlate_ILOAD(), whirl2xaif::xlate_LDA(), and whirl2xaif::xlate_LDID().
| std::string whirl2xaif::XlationContext::toString | ( | ) | const |
Definition at line 141 of file XlationContext.cxx.
References ASSIGN, CRAY_IO, DEREF_ADDR, DEREF_IO_ITEM, flagToString(), FMT_IO, HAS_LOGICAL_ARG, HAS_NO_ARR_ELMT, IO_STMT, IS_LOGICAL_ARG, IS_LOGICAL_OPERATION, isFlag(), myStackPosition, myWNp, ORIGFMT_IOCTRL, and VARREF.
Referenced by dump(), setFlag(), and unsetFlag().

Definition at line 79 of file XlationContext.cxx.
References flagToString(), FORTTK_MSG, myFlags, and toString().
Referenced by whirl2xaif::TranslateWN(), whirl2xaif::WN2F_arrsection(), whirl2xaif::WN2F_Arrsection_Slots(), WN2F_Intr_Funcall(), WN2F_ios_definefile(), whirl2xaif::WN2F_parm(), whirl2xaif::WN2F_pstid(), whirl2xaif::WN2F_pstore(), whirl2xaif::WN2F_src_triplet(), whirl2xaif::WN2F_String_Argument(), whirl2xaif::WN2F_Substring(), whirl2xaif::xlate_ARRAY(), whirl2xaif::xlate_ArrayIndices(), whirl2xaif::xlate_BinaryOp(), whirl2xaif::xlate_CALL(), whirl2xaif::xlate_ILOAD(), whirl2xaif::xlate_IO(), whirl2xaif::xlate_IO_ITEM(), xlate_IO_ITEM_control(), xlate_IO_ITEM_list(), whirl2xaif::xlate_ISTORE(), whirl2xaif::xlate_LDA(), whirl2xaif::xlate_LDID(), whirl2xaif::xlate_MemRef(), whirl2xaif::xlate_STID(), and whirl2xaif::xlate_SymRef().

unsigned int whirl2xaif::XlationContext::myFlags [private] |
the flags
Definition at line 116 of file XlationContext.h.
Referenced by inheritFlags(), isFlag(), setFlag(), and unsetFlag().
unsigned int whirl2xaif::XlationContext::myNextEdgeId [private] |
next unique edge id for this context
Definition at line 111 of file XlationContext.h.
Referenced by getEdgeId(), getNewEdgeId(), and peekEdgeId().
unsigned int whirl2xaif::XlationContext::myNextVertexId [private] |
next unique vertex id for this context
Definition at line 106 of file XlationContext.h.
Referenced by getNewVertexId(), getVertexId(), and peekVertexId().
unsigned int whirl2xaif::XlationContext::myStackPosition [private] |
for debugging purposes - the stack position
Definition at line 121 of file XlationContext.h.
Referenced by toString().
WN* whirl2xaif::XlationContext::myWNp [private] |
we don't own this one
Definition at line 101 of file XlationContext.h.
Referenced by getWN(), hasWN(), setWN(), and toString().