OpenADFortTk (including Open64 and OpenAnalysis references)
|
#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) /
Definition at line 43 of file IntrinsicXlationTable.h.
|
private |
Definition at line 197 of file IntrinsicXlationTable.h.
|
private |
Definition at line 198 of file IntrinsicXlationTable.h.
|
private |
Definition at line 199 of file IntrinsicXlationTable.h.
Enumerator | |
---|---|
W2X | |
X2W |
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.
Enumerator | |
---|---|
WNCall | |
WNIntrinCall | |
WNIntrinOp | |
WNExpr | |
WNOprClass_UNKNOWN |
Definition at line 55 of file IntrinsicXlationTable.h.
XAIFOpr is the analog of the WHIRL 'OPERATOR'. It is not really needed at this point.
Enumerator | |
---|---|
XAIFSubCall | |
XAIFFuncCall | |
XAIFIntrin | |
XAIFBoolOp | |
XAIFOpr_UNKNOWN |
Definition at line 69 of file IntrinsicXlationTable.h.
fortTkSupport::IntrinsicXlationTable::IntrinsicXlationTable | ( | const TableType & | tt) |
Definition at line 283 of file IntrinsicXlationTable.cxx.
References mySortedTable, myTableType, ourTable, and ourTableSize.
fortTkSupport::IntrinsicXlationTable::~IntrinsicXlationTable | ( | ) |
Definition at line 297 of file IntrinsicXlationTable.cxx.
|
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, name, NULL, 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, name, OPERATOR_name(), fortTkSupport::IntrinsicXlationTable::WHIRLInfo::opr, fortTkSupport::IntrinsicXlationTable::WHIRLInfo::oprcl, W2X, fortTkSupport::IntrinsicXlationTable::Entry::whirl_info, WNOprClass_UNKNOWN, and fortTkSupport::IntrinsicXlationTable::Entry::xaif_info.
|
private |
no def
|
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().
|
static |
Definition at line 168 of file IntrinsicXlationTable.cxx.
References FORTTK_DIE, XAIFBoolOp, XAIFFuncCall, XAIFIntrin, and XAIFSubCall.
|
private |
Definition at line 204 of file IntrinsicXlationTable.h.
Referenced by dump(), findWHIRLInfo(), findXAIFInfo(), and IntrinsicXlationTable().
|
private |
Definition at line 203 of file IntrinsicXlationTable.h.
Referenced by dump(), findWHIRLInfo(), findXAIFInfo(), IntrinsicXlationTable(), fortTkSupport::IntrinsicXlationTable::LtSortedTable::operator()(), and fortTkSupport::PrintEntry::operator()().
|
staticprivate |
Definition at line 206 of file IntrinsicXlationTable.h.
Referenced by IntrinsicXlationTable().
|
staticprivate |
Definition at line 207 of file IntrinsicXlationTable.h.
Referenced by IntrinsicXlationTable().