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

#include <IntrinsicXlationTable.h>

Collaboration diagram for fortTkSupport::IntrinsicXlationTable:
Collaboration graph

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)
 
WHIRLInfofindWHIRLInfo (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)
 
IntrinsicXlationTableoperator= (const IntrinsicXlationTable &p)
 

Private Attributes

TableType myTableType
 
SortedTable mySortedTable
 

Static Private Attributes

static Entry ourTable []
 
static unsigned int ourTableSize
 

Detailed Description

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.

Member Typedef Documentation

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.

Member Enumeration Documentation

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.

Constructor & Destructor Documentation

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.

fortTkSupport::IntrinsicXlationTable::IntrinsicXlationTable ( const IntrinsicXlationTable p)
private

no def

Member Function Documentation

void fortTkSupport::IntrinsicXlationTable::ddump ( ) const

Definition at line 400 of file IntrinsicXlationTable.cxx.

References dump().

Here is the call graph for this function:

void fortTkSupport::IntrinsicXlationTable::dump ( std::ostream &  os = std::cerr) const
IntrinsicXlationTable& fortTkSupport::IntrinsicXlationTable::operator= ( const IntrinsicXlationTable p)
private

no def

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.

Member Data Documentation

SortedTable fortTkSupport::IntrinsicXlationTable::mySortedTable
private

Definition at line 204 of file IntrinsicXlationTable.h.

Referenced by dump(), findWHIRLInfo(), findXAIFInfo(), and IntrinsicXlationTable().

IntrinsicXlationTable::Entry fortTkSupport::IntrinsicXlationTable::ourTable
staticprivate

Definition at line 206 of file IntrinsicXlationTable.h.

Referenced by IntrinsicXlationTable().

unsigned int fortTkSupport::IntrinsicXlationTable::ourTableSize
staticprivate
Initial value:
=
(sizeof(IntrinsicXlationTable::ourTable) / sizeof(IntrinsicXlationTable::Entry))

Definition at line 207 of file IntrinsicXlationTable.h.

Referenced by IntrinsicXlationTable().


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