|
OpenADFortTk (basic)
|
#include <IntrinsicXlationTable.h>

Classes | |
| struct | Entry |
| class | LtSortedTable |
| struct | WHIRLInfo |
| struct | XAIFInfo |
| struct | XAIFInfoPair |
Public Types | |
| enum | TableType { W2X, X2W } |
| enum | WNOprClass { WNCall = 0, WNIntrinCall = 1, WNIntrinOp = 2, WNExpr = 3, WNOprClass_UNKNOWN = 4 } |
| enum | XAIFOpr { XAIFSubCall, XAIFFuncCall, XAIFIntrin, XAIFBoolOp, XAIFOpr_UNKNOWN } |
Public Member Functions | |
| IntrinsicXlationTable (const TableType &tt) | |
| ~IntrinsicXlationTable () | |
| XAIFInfoPair | findXAIFInfo (OPERATOR opr, const char *name, bool mustFind=true) |
| WHIRLInfo * | findWHIRLInfo (XAIFOpr opr, const char *name, const char *key) |
| void | dump (std::ostream &os=std::cerr) const |
| void | ddump () const |
Static Public Member Functions | |
| static const std::string | toString (const WNOprClass &oprcl) |
| static const std::string | toString (const XAIFOpr &opr) |
Private Types | |
| typedef std::vector< Entry * > | SortedTable |
| typedef SortedTable::iterator | SortedTableIt |
| typedef SortedTable::value_type | SortedTableVal |
Private Member Functions | |
| IntrinsicXlationTable (const IntrinsicXlationTable &p) | |
| IntrinsicXlationTable & | operator= (const IntrinsicXlationTable &p) |
Private Attributes | |
| TableType | myTableType |
| SortedTable | mySortedTable |
Static Private Attributes | |
| static Entry | ourTable [] |
| static unsigned int | ourTableSize |
IntrinsicXlationTable: There is not a trivial correspondence between WHIRL and XAIF function/subroutine calls and intrinsics. We use this table to determine how translation between WHIRL <-> XAIF should proceed.
These are the types of relationships that currently exist in translation. The starred (*) relationships are explicitly included in the table.
WHIRL XAIF ----- ----
/-------> SubCall (using WHIRL name) /--------> FuncCall (using WHIRL name) / * OPR_CALL <------------------> * Intrinsic, using XAIF name
* OPR_INTRINSIC_CALL <---------> * Intrinsic, using XAIF name
* OPR_INTRINSIC_OP <-----------> * Intrinsic, using XAIF name
* OPR_TRUNC <------------------> * Intrinsic, using XAIF name et al.
* OPR_EQ <------------------> * BooleanOp, using XAIF name
Definition at line 43 of file IntrinsicXlationTable.h.
typedef std::vector<Entry*> fortTkSupport::IntrinsicXlationTable::SortedTable [private] |
Definition at line 197 of file IntrinsicXlationTable.h.
typedef SortedTable::iterator fortTkSupport::IntrinsicXlationTable::SortedTableIt [private] |
Definition at line 198 of file IntrinsicXlationTable.h.
typedef SortedTable::value_type fortTkSupport::IntrinsicXlationTable::SortedTableVal [private] |
Definition at line 199 of file IntrinsicXlationTable.h.
Definition at line 46 of file IntrinsicXlationTable.h.
WNOprClass: Three completely different kinds of WHIRL operators are translated into an XAIF intrinsic and vice-versa.
Definition at line 55 of file IntrinsicXlationTable.h.
XAIFOpr is the analog of the WHIRL 'OPERATOR'. It is not really needed at this point.
Definition at line 69 of file IntrinsicXlationTable.h.
Definition at line 283 of file IntrinsicXlationTable.cxx.
References mySortedTable, myTableType, ourTable, and ourTableSize.
Definition at line 297 of file IntrinsicXlationTable.cxx.
| fortTkSupport::IntrinsicXlationTable::IntrinsicXlationTable | ( | const IntrinsicXlationTable & | p | ) | [private] |
no def
| void fortTkSupport::IntrinsicXlationTable::ddump | ( | ) | const |
Definition at line 400 of file IntrinsicXlationTable.cxx.
References dump().

| void fortTkSupport::IntrinsicXlationTable::dump | ( | std::ostream & | os = std::cerr | ) | const |
Definition at line 391 of file IntrinsicXlationTable.cxx.
References mySortedTable, and myTableType.
Referenced by fortTkSupport::IntrinsicXlationTable::WHIRLInfo::ddump(), fortTkSupport::IntrinsicXlationTable::XAIFInfo::ddump(), and ddump().
| IntrinsicXlationTable::WHIRLInfo * fortTkSupport::IntrinsicXlationTable::findWHIRLInfo | ( | XAIFOpr | opr, |
| const char * | name, | ||
| const char * | key | ||
| ) |
Definition at line 332 of file IntrinsicXlationTable.cxx.
References FORTTK_DIE, fortTkSupport::IntrinsicXlationTable::XAIFInfo::key, mySortedTable, myTableType, fortTkSupport::IntrinsicXlationTable::XAIFInfo::name, fortTkSupport::IntrinsicXlationTable::XAIFInfo::opr, toString(), fortTkSupport::IntrinsicXlationTable::Entry::whirl_info, X2W, and fortTkSupport::IntrinsicXlationTable::Entry::xaif_info.
Referenced by xaif2whirl::XlateExpression::xlate_ExprOpUsingIntrinsicTable().

| IntrinsicXlationTable::XAIFInfoPair fortTkSupport::IntrinsicXlationTable::findXAIFInfo | ( | OPERATOR | opr, |
| const char * | name, | ||
| bool | mustFind = true |
||
| ) |
first is true if we found it
Definition at line 307 of file IntrinsicXlationTable.cxx.
References FORTTK_DIE, mySortedTable, myTableType, fortTkSupport::IntrinsicXlationTable::WHIRLInfo::name, fortTkSupport::IntrinsicXlationTable::WHIRLInfo::opr, fortTkSupport::IntrinsicXlationTable::WHIRLInfo::oprcl, W2X, fortTkSupport::IntrinsicXlationTable::Entry::whirl_info, WNOprClass_UNKNOWN, and fortTkSupport::IntrinsicXlationTable::Entry::xaif_info.
| IntrinsicXlationTable& fortTkSupport::IntrinsicXlationTable::operator= | ( | const IntrinsicXlationTable & | p | ) | [private] |
no def
| const std::string fortTkSupport::IntrinsicXlationTable::toString | ( | const WNOprClass & | oprcl | ) | [static] |
Definition at line 146 of file IntrinsicXlationTable.cxx.
References FORTTK_DIE, WNCall, WNExpr, WNIntrinCall, and WNIntrinOp.
Referenced by fortTkSupport::IntrinsicXlationTable::WHIRLInfo::dump(), fortTkSupport::IntrinsicXlationTable::XAIFInfo::dump(), findWHIRLInfo(), and xlate_BinaryOpUsingIntrinsicTable().
| const std::string fortTkSupport::IntrinsicXlationTable::toString | ( | const XAIFOpr & | opr | ) | [static] |
Definition at line 168 of file IntrinsicXlationTable.cxx.
References FORTTK_DIE, XAIFBoolOp, XAIFFuncCall, XAIFIntrin, and XAIFSubCall.
Definition at line 204 of file IntrinsicXlationTable.h.
Referenced by dump(), findWHIRLInfo(), findXAIFInfo(), and IntrinsicXlationTable().
Definition at line 203 of file IntrinsicXlationTable.h.
Referenced by dump(), findWHIRLInfo(), findXAIFInfo(), IntrinsicXlationTable(), fortTkSupport::IntrinsicXlationTable::LtSortedTable::operator()(), and fortTkSupport::PrintEntry::operator()().
IntrinsicXlationTable::Entry fortTkSupport::IntrinsicXlationTable::ourTable [static, private] |
Definition at line 206 of file IntrinsicXlationTable.h.
Referenced by IntrinsicXlationTable().
unsigned int fortTkSupport::IntrinsicXlationTable::ourTableSize [static, private] |
(sizeof(IntrinsicXlationTable::ourTable) / sizeof(IntrinsicXlationTable::Entry))
Definition at line 207 of file IntrinsicXlationTable.h.
Referenced by IntrinsicXlationTable().