OpenADFortTk (including Open64 and OpenAnalysis references)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
xaif2whirl Namespace Reference

Classes

class  AdjustFunctions
 
class  PUXlationContext
 
class  ConvertModuleTypeFctr
 
struct  sort_CondVal
 
class  MyDGNode
 
class  MyDGEdge
 
class  XAIF_DOMErrorHandler
 
class  XAIF_ElemFilter
 
class  XAIF_ScopeElemFilter
 
class  XAIF_SymbolElemFilter
 
class  XAIF_DimensionBoundsElemFilter
 
class  XAIF_CFGElemFilter
 
class  XAIF_BBElemFilter
 
class  XAIF_BBStmtElemFilter
 
class  XAIF_DerivPropStmt
 
class  XAIF_SAXErrorHandler
 
class  XAIF_SAXHandler
 
class  XercesStrX
 
struct  XAIFEdgePositionCompare
 
struct  replaceIfLocal
 
class  XlateExpression
 
class  XlateStmt
 
class  XlationContext
 

Typedefs

typedef std::map< std::string,
OA::OA_ptr< MyDGNode > > 
VertexIdToMyDGNodeMap
 

Enumerations

enum  AlgorithmType { ALG_NULL, ALG_BB_PATCHING }
 

Functions

static int real_main (int argc, char **argv)
 
static int main_SAX (PU_Info *pu_forest, const char *xaiffilenm, bool validate)
 
static int main_DOM (PU_Info *pu_forest, const char *xaiffilenm, bool validate)
 
static int XercesInit ()
 
static int XercesFini ()
 
static void TranslateCFG (WN *wn_pu, const xercesc::DOMElement *cfgElem, PUXlationContext &ctxt)
 
static WNxlate_CFG (WN *wn_pu, OA::OA_ptr< OA::DGraph::DGraphInterface > cfg, OA::OA_ptr< MyDGNode > root, PUXlationContext &ctxt, unsigned &startLabel_r, bool structuredCF)
 
static WNTranslateBasicBlock (WN *wn_pu, const xercesc::DOMElement *bbElem, PUXlationContext &ctxt, bool skipMarkeredGotoAndLabels, unsigned endLabel)
 
static void TranslateBB_OLD (WN *wn_pu, const xercesc::DOMElement *bbElem, PUXlationContext &ctxt)
 
static void xlate_BasicBlock_OLD (WN *wn_pu, const xercesc::DOMElement *bbElem, PUXlationContext &ctxt)
 
static void xlate_BBCond_OLD (WN *wn_pu, const xercesc::DOMElement *bbElem, PUXlationContext &ctxt)
 
static bool FindNextStmtInterval (const xercesc::DOMElement *bbElem, fortTkSupport::IdList< fortTkSupport::WNId > *bbIdList, fortTkSupport::WNIdToWNMap *wnmap, WN *blkWN, xercesc::DOMElement *&begXAIF, xercesc::DOMElement *&endXAIF, WN *&begWN, WN *&endWN)
 
static WNFindIntervalBoundary (const xercesc::DOMElement *elem, fortTkSupport::IdList< fortTkSupport::WNId > *bbIdList, fortTkSupport::WNIdToWNMap *wnmap, WN *blkWN, int boundary)
 
static WNFindWNBlock (const xercesc::DOMElement *bbElem, fortTkSupport::IdList< fortTkSupport::WNId > *idlist, PUXlationContext &ctxt)
 
static WNFindSafeInsertionPoint (WN *blckWN, WN *stmtWN)
 
static void RemoveFromWhirlIdMaps (WN *wn, fortTkSupport::WNToWNIdMap *wn2idmap, fortTkSupport::WNIdToWNMap *id2wnmap)
 
static void xlate_SymbolTable (const xercesc::DOMElement *elem, const char *scopeId, PU_Info *pu, PUXlationContext &ctxt)
 
static void xlate_Symbol (const xercesc::DOMElement *elem, const char *scopeId, PU_Info *pu, PUXlationContext &ctxt, bool doTempSymbols)
 
static WNCreateOpenADReplacementBeg (const char *placeholder)
 
static WNCreateOpenADReplacementEnd ()
 
static WNCreateIfCondition (WN *condWN)
 
static STCreateST (const xercesc::DOMElement *elem, SYMTAB_IDX level, const char *nm, fortTkSupport::XAIFSymToSymbolMap &symMap, const char *scopeId)
 
static STConvertIntoGlobalST (ST *st)
 
static void ConvertToActiveType (ST *st)
 
static void ConvertStructMemberToActiveType (TY_IDX base_ty, TY_IDX ref_ty, UINT field_id)
 
static void ConvertScalarizedRefToActiveType (WN *wn)
 
static FLD_HANDLE TY_Lookup_FLD (TY_IDX struct_ty, TY_IDX ref_ty, UINT64 ref_ofst, unsigned short eqInst=1)
 
static TY_IDX MY_Make_Array_Type (TY_IDX elem_ty, INT32 ndim, bool fixed, const INT64 *lower, const INT64 *upper)
 
static TY_IDX XAIFTyToWHIRLTy (const char *type, const TYPE_ID mtype)
 
static OA::OA_ptr
< OA::DGraph::DGraphInterface
CreateCFGraph (const xercesc::DOMElement *elem)
 
void TranslateCFG (PU_Info *pu_forest, const xercesc::DOMElement *cfgElem, PUXlationContext &ctxt)
 
static WNxlate_CFG_BasicBlock (WN *wn_pu, OA::OA_ptr< MyDGNode > curBB, PUXlationContext &ctxt, bool skipMarkeredGotoAndLabels, unsigned newCurBBLbl, unsigned newNextBBLbl, unsigned endLabel)
 
static WNxlate_CFG_BranchMulti (OA::OA_ptr< MyDGNode > curNode, WN *condWN, unsigned lastLbl, vector< OA::OA_ptr< MyDGEdge > > &outedges, map< OA::OA_ptr< MyDGNode >, unsigned > &nodeToLblMap)
 
static pair< WN *, OA::OA_ptr
< MyDGNode > > 
xlate_CFGstruct (WN *wn_pu, OA::OA_ptr< OA::DGraph::DGraphInterface > cfg, OA::OA_ptr< MyDGNode > startNode, set< xercesc::DOMElement * > &xlated, PUXlationContext &ctxt, unsigned int &startLabel_r)
 
static WNxlate_CFGunstruct (WN *wn_pu, OA::OA_ptr< OA::DGraph::DGraphInterface > cfg, OA::OA_ptr< MyDGNode > startNode, set< xercesc::DOMElement * > &xlated, PUXlationContext &ctxt, unsigned int &startLabel_r)
 
static WNxlate_CFG (WN *wn_pu, OA::OA_ptr< OA::DGraph::DGraphInterface > cfg, OA::OA_ptr< MyDGNode > root, PUXlationContext &ctxt, unsigned int &startLabel_r, bool structuredCF)
 
OA::OA_ptr< std::list
< OA::OA_ptr
< OA::DGraph::NodeInterface > > > 
getOrderedSinkNodesList (OA::OA_ptr< OA::DGraph::DGraphInterface > cfg, OA::OA_ptr< OA::DGraph::NodeInterface > pNode)
 
void getReversePostDFSListR (OA::OA_ptr< OA::DGraph::DGraphInterface > cfg, OA::OA_ptr< OA::DGraph::NodeInterface > pNode, std::map< OA::OA_ptr< OA::DGraph::NodeInterface >, bool > &visitMap, OA::OA_ptr< std::list< OA::OA_ptr< OA::DGraph::NodeInterface > > > pList)
 
OA::OA_ptr< std::list
< OA::OA_ptr
< OA::DGraph::NodeInterface > > > 
getReversePostDFSList (OA::OA_ptr< OA::DGraph::DGraphInterface > cfg)
 
fortTkSupport::SymbolGetSymbol (const xercesc::DOMElement *elem, PUXlationContext &ctxt)
 
fortTkSupport::SymbolGetOrCreateSymbol (const char *sname, PUXlationContext &ctxt)
 
fortTkSupport::SymbolGetOrCreateBogusTmpSymbol (PUXlationContext &ctxt)
 
void xlate_Scope (const xercesc::DOMElement *elem, PUXlationContext &ctxt)
 
bool GetBoolAttr (const xercesc::DOMElement *elem, XMLCh *attr, bool default_val)
 
int GetIntAttr (const xercesc::DOMElement *elem, XMLCh *attr, int default_val)
 
bool GetHasConditionAttr (const xercesc::DOMElement *elem)
 
unsigned int GetCondAttr (const xercesc::DOMElement *elem)
 
bool GetActiveAttr (const xercesc::DOMElement *elem)
 
bool GetDerivAttr (const xercesc::DOMElement *elem)
 
unsigned int GetPositionAttr (const xercesc::DOMElement *elem)
 
bool IsTagPresent (const xercesc::DOMElement *elem, const char *tag)
 
bool IsTagPresent (const char *annotstr, const char *tag)
 
fortTkSupport::SymTabId GetSymTabId (const xercesc::DOMElement *elem)
 
fortTkSupport::SymId GetSymId (const xercesc::DOMElement *elem)
 
fortTkSupport::PUId GetPUId (const xercesc::DOMElement *elem)
 
fortTkSupport::WNId GetWNId (const xercesc::DOMElement *elem)
 
fortTkSupport::IdList
< fortTkSupport::WNId > * 
GetWNIdList (const xercesc::DOMElement *elem)
 
std::string GetIntrinsicKey (const xercesc::DOMElement *elem)
 
PREG_IDX GetPregId (const xercesc::DOMElement *elem)
 
template<class T >
GetId (const xercesc::DOMElement *elem, const char *tag)
 
template<class T >
fortTkSupport::IdList< T > * GetIdList (const xercesc::DOMElement *elem, const char *tag)
 
template<class T >
GetId (const char *idstr, const char *tag)
 
template<class T >
fortTkSupport::IdList< T > * GetIdList (const char *idstr, const char *tag)
 
WNCreateCallToIntrin (TYPE_ID rtype, const char *fname, unsigned int argc)
 
WNCreateCallToIntrin (TYPE_ID rtype, const char *fname, std::vector< WN * > &args)
 
WNCreateIntrinsicCall (OPERATOR opr, INTRINSIC intrn, TYPE_ID rtype, TYPE_ID dtype, std::vector< WN * > &args)
 
WNCreateBoolConst (unsigned int val)
 
void DeclareActiveTypes ()
 
TYPE_ID XAIFFETypeToWHIRLMTy (const char *anFETypeName)
 
OA::OA_ptr< MyDGNodeGetSuccessor (OA::OA_ptr< MyDGNode > node, bool succIsOutEdge)
 
OA::OA_ptr< MyDGNodeGetSuccessorAlongEdge (OA::OA_ptr< MyDGNode > node, unsigned int condition, bool succIsOutEdge)
 
static std::string DumpDotGraph_GetNodeName (OA::OA_ptr< MyDGNode > n)
 
void DDumpDotGraph (OA::OA_ptr< OA::DGraph::DGraphInterface > graph)
 
void DumpDotGraph (std::ostream &os, OA::OA_ptr< OA::DGraph::DGraphInterface > graph)
 
void TranslateIR (PU_Info *pu_forest, const xercesc::DOMDocument *doc)
 
WNCreateParm (WN *arg, UINT32 flag)
 
static void XercesPrintNode (std::ostream &os, const DOMNode *n, int iter)
 
static void XercesPrintTree (std::ostream &os, const DOMNode *n, int ilevel)
 
void XercesPrintNode (std::ostream &os, const DOMNode *n)
 
void XercesPrintTree (std::ostream &os, const DOMNode *n)
 
std::ostream & operator<< (std::ostream &os, const DOMElement &elem)
 
void XercesDumpNode (const DOMNode *n)
 
void XercesDumpTree (const DOMNode *n)
 
void XercesDumpNode (void *n)
 
void XercesDumpTree (void *n)
 
DOMElement * GetFirstChildElement (const DOMNode *n)
 
DOMElement * GetLastChildElement (const DOMNode *n)
 
DOMElement * GetChildElement (const DOMNode *n, const XMLCh *name)
 
DOMElement * GetChildElement (const DOMNode *n, const DOMNodeFilter *filter)
 
unsigned int GetChildElementCount (const DOMNode *n)
 
DOMElement * GetPrevSiblingElement (const DOMNode *n)
 
DOMElement * GetNextSiblingElement (const DOMNode *n)
 
DOMElement * GetNextSiblingElement (const DOMNode *n, const XMLCh *name)
 
DOMElement * GetNextSiblingElement (const DOMNode *n, const DOMNodeFilter *filter)
 
void XercesPrintNode (std::ostream &os, const xercesc::DOMNode *n)
 
void XercesPrintTree (std::ostream &os, const xercesc::DOMNode *n)
 
std::ostream & operator<< (std::ostream &os, const xercesc::DOMElement &elem)
 
void XercesDumpNode (const xercesc::DOMNode *n)
 
void XercesDumpTree (const xercesc::DOMNode *n)
 
xercesc::DOMElement * GetFirstChildElement (const xercesc::DOMNode *n)
 
xercesc::DOMElement * GetLastChildElement (const xercesc::DOMNode *n)
 
xercesc::DOMElement * GetChildElement (const xercesc::DOMNode *n, const XMLCh *name)
 
xercesc::DOMElement * GetChildElement (const xercesc::DOMNode *n, const xercesc::DOMNodeFilter *filter)
 
unsigned int GetChildElementCount (const xercesc::DOMNode *n)
 
xercesc::DOMElement * GetPrevSiblingElement (const xercesc::DOMNode *n)
 
xercesc::DOMElement * GetNextSiblingElement (const xercesc::DOMNode *n)
 
xercesc::DOMElement * GetNextSiblingElement (const xercesc::DOMNode *n, const XMLCh *name)
 
xercesc::DOMElement * GetNextSiblingElement (const xercesc::DOMNode *n, const xercesc::DOMNodeFilter *filter)
 
std::ostream & operator<< (std::ostream &os, const XMLCh *const toDump)
 
std::ostream & operator<< (std::ostream &os, const XercesStrX &toDump)
 
bool conversionToReal (fortTkSupport::IntrinsicXlationTable::WHIRLInfo &info)
 

Variables

TY_IDX ActiveTypeTyIdx
 
TY_IDX ActiveTypeInitializedTyIdx
 
AlgorithmType opt_algorithm = ALG_NULL
 
fortTkSupport::IntrinsicXlationTable IntrinsicTable (fortTkSupport::IntrinsicXlationTable::X2W)
 
fortTkSupport::WNIdToWNTabMap WNIdToWNTableMap
 

Typedef Documentation

Definition at line 185 of file xaif2whirl.h.

Enumeration Type Documentation

Enumerator
ALG_NULL 
ALG_BB_PATCHING 

Definition at line 25 of file xaif2whirl.h.

Function Documentation

static ST * xaif2whirl::ConvertIntoGlobalST ( ST st)
static
static void xaif2whirl::ConvertScalarizedRefToActiveType ( WN wn)
static
static void xaif2whirl::ConvertStructMemberToActiveType ( TY_IDX  base_ty,
TY_IDX  ref_ty,
UINT  field_id 
)
static
WN * xaif2whirl::CreateBoolConst ( unsigned int  val)
WN * xaif2whirl::CreateCallToIntrin ( TYPE_ID  rtype,
const char *  fname,
std::vector< WN * > &  args 
)
static WN * xaif2whirl::CreateIfCondition ( WN condWN)
static

Definition at line 2183 of file xaif2whirl.cxx.

References Boolean_type, OPERATOR_is_load(), TY_is_logical(), WN_NE, WN_operator(), WN_Tree_Type(), and WN_Zerocon().

Referenced by xlate_CFGstruct(), and xlate_CFGunstruct().

Here is the call graph for this function:

WN * xaif2whirl::CreateIntrinsicCall ( OPERATOR  opr,
INTRINSIC  intrn,
TYPE_ID  rtype,
TYPE_ID  dtype,
std::vector< WN * > &  args 
)

Definition at line 2128 of file xaif2whirl.cxx.

References WN_Create_Intrinsic().

Referenced by xaif2whirl::XlateExpression::xlate_ExprOpUsingIntrinsicTable().

Here is the call graph for this function:

static WN * xaif2whirl::CreateOpenADReplacementBeg ( const char *  placeholder)
static

Definition at line 2162 of file xaif2whirl.cxx.

References WN_CreateComment().

Referenced by TranslateCFG().

Here is the call graph for this function:

static WN * xaif2whirl::CreateOpenADReplacementEnd ( )
static

Definition at line 2172 of file xaif2whirl.cxx.

References WN_CreateComment().

Referenced by TranslateCFG().

Here is the call graph for this function:

void xaif2whirl::DDumpDotGraph ( OA::OA_ptr< OA::DGraph::DGraphInterface graph)

Definition at line 2898 of file xaif2whirl.cxx.

References DumpDotGraph().

Here is the call graph for this function:

void xaif2whirl::DeclareActiveTypes ( )
void xaif2whirl::DumpDotGraph ( std::ostream &  os,
OA::OA_ptr< OA::DGraph::DGraphInterface graph 
)
static std::string xaif2whirl::DumpDotGraph_GetNodeName ( OA::OA_ptr< MyDGNode >  n)
static
static WN * xaif2whirl::FindIntervalBoundary ( const xercesc::DOMElement *  elem,
fortTkSupport::IdList< fortTkSupport::WNId > *  bbIdList,
fortTkSupport::WNIdToWNMap wnmap,
WN blkWN,
int  boundary 
)
static
static bool xaif2whirl::FindNextStmtInterval ( const xercesc::DOMElement *  bbElem,
fortTkSupport::IdList< fortTkSupport::WNId > *  bbIdList,
fortTkSupport::WNIdToWNMap wnmap,
WN blkWN,
xercesc::DOMElement *&  begXAIF,
xercesc::DOMElement *&  endXAIF,
WN *&  begWN,
WN *&  endWN 
)
static
static WN * xaif2whirl::FindSafeInsertionPoint ( WN blckWN,
WN stmtWN 
)
static

Definition at line 1634 of file xaif2whirl.cxx.

References NULL, OPC_I4INTCONST, WN_CreateAssert(), WN_CreateIntconst(), WN_INSERT_BlockBefore(), and WN_prev().

Referenced by xlate_BasicBlock_OLD().

Here is the call graph for this function:

static WN * xaif2whirl::FindWNBlock ( const xercesc::DOMElement *  bbElem,
fortTkSupport::IdList< fortTkSupport::WNId > *  idlist,
PUXlationContext &  ctxt 
)
static

Definition at line 1612 of file xaif2whirl.cxx.

References xaif2whirl::PUXlationContext::findParentBlockWN(), xaif2whirl::PUXlationContext::findWN(), and NULL.

Referenced by TranslateBasicBlock(), and xlate_BasicBlock_OLD().

Here is the call graph for this function:

bool xaif2whirl::GetActiveAttr ( const xercesc::DOMElement *  elem)

Definition at line 1897 of file xaif2whirl.cxx.

References XAIFStringRepository::attr_active_x(), GetBoolAttr(), and XAIFStrings.

Referenced by CreateST(), and xlate_Symbol().

Here is the call graph for this function:

bool xaif2whirl::GetBoolAttr ( const xercesc::DOMElement *  elem,
XMLCh *  attr,
bool  default_val 
)

Definition at line 1846 of file xaif2whirl.cxx.

References xaif2whirl::XercesStrX::c_str().

Referenced by GetActiveAttr(), GetDerivAttr(), GetHasConditionAttr(), TranslateCFG(), and xlate_Symbol().

Here is the call graph for this function:

xercesc::DOMElement* xaif2whirl::GetChildElement ( const xercesc::DOMNode *  n,
const XMLCh *  name 
)
xercesc::DOMElement* xaif2whirl::GetChildElement ( const xercesc::DOMNode *  n,
const xercesc::DOMNodeFilter *  filter 
)
DOMElement* xaif2whirl::GetChildElement ( const DOMNode *  n,
const DOMNodeFilter *  filter 
)

Definition at line 186 of file XAIF_DOMFilters.cxx.

References NULL.

unsigned int xaif2whirl::GetChildElementCount ( const xercesc::DOMNode *  n)
unsigned int xaif2whirl::GetChildElementCount ( const DOMNode *  n)
unsigned int xaif2whirl::GetCondAttr ( const xercesc::DOMElement *  elem)
xercesc::DOMElement* xaif2whirl::GetFirstChildElement ( const xercesc::DOMNode *  n)
bool xaif2whirl::GetHasConditionAttr ( const xercesc::DOMElement *  elem)

Definition at line 1879 of file xaif2whirl.cxx.

References XAIFStringRepository::attr_hasCondval_x(), GetBoolAttr(), and XAIFStrings.

Referenced by GetCondAttr(), getOrderedSinkNodesList(), and xlate_CFG_BranchMulti().

Here is the call graph for this function:

template<class T >
T xaif2whirl::GetId ( const xercesc::DOMElement *  elem,
const char *  tag 
)

Definition at line 1991 of file xaif2whirl.cxx.

References XAIFStringRepository::attr_annot_x(), xaif2whirl::XercesStrX::c_str(), NULL, and XAIFStrings.

Here is the call graph for this function:

template<class T >
T xaif2whirl::GetId ( const char *  idstr,
const char *  tag 
)

Definition at line 2016 of file xaif2whirl.cxx.

References FORTTK_ASSERT, NULL, XAIFStringRepository::tag_End(), and XAIFStrings.

Here is the call graph for this function:

template<class T >
fortTkSupport::IdList< T > * xaif2whirl::GetIdList ( const xercesc::DOMElement *  elem,
const char *  tag 
)

Definition at line 2003 of file xaif2whirl.cxx.

References XAIFStringRepository::attr_annot_x(), xaif2whirl::XercesStrX::c_str(), NULL, and XAIFStrings.

Here is the call graph for this function:

template<class T >
fortTkSupport::IdList< T > * xaif2whirl::GetIdList ( const char *  idstr,
const char *  tag 
)

Definition at line 2038 of file xaif2whirl.cxx.

References FORTTK_ASSERT, NULL, XAIFStringRepository::tag_End(), and XAIFStrings.

Here is the call graph for this function:

int xaif2whirl::GetIntAttr ( const xercesc::DOMElement *  elem,
XMLCh *  attr,
int  default_val 
)

Definition at line 1865 of file xaif2whirl.cxx.

References xaif2whirl::XercesStrX::c_str(), and NULL.

Referenced by GetCondAttr(), GetPositionAttr(), and xaif2whirl::XlateStmt::xlate_SubroutineCall().

Here is the call graph for this function:

std::string xaif2whirl::GetIntrinsicKey ( const xercesc::DOMElement *  elem)
xercesc::DOMElement* xaif2whirl::GetLastChildElement ( const xercesc::DOMNode *  n)
DOMElement* xaif2whirl::GetLastChildElement ( const DOMNode *  n)

Definition at line 159 of file XAIF_DOMFilters.cxx.

References NULL.

Referenced by FindNextStmtInterval().

xercesc::DOMElement* xaif2whirl::GetNextSiblingElement ( const xercesc::DOMNode *  n)
xercesc::DOMElement* xaif2whirl::GetNextSiblingElement ( const xercesc::DOMNode *  n,
const XMLCh *  name 
)
xercesc::DOMElement* xaif2whirl::GetNextSiblingElement ( const xercesc::DOMNode *  n,
const xercesc::DOMNodeFilter *  filter 
)
DOMElement* xaif2whirl::GetNextSiblingElement ( const DOMNode *  n,
const XMLCh *  name 
)

Definition at line 252 of file XAIF_DOMFilters.cxx.

References filter(), and GetNextSiblingElement().

Here is the call graph for this function:

DOMElement* xaif2whirl::GetNextSiblingElement ( const DOMNode *  n,
const DOMNodeFilter *  filter 
)

Definition at line 261 of file XAIF_DOMFilters.cxx.

References GetNextSiblingElement(), OA::n, and NULL.

Here is the call graph for this function:

fortTkSupport::Symbol * xaif2whirl::GetOrCreateBogusTmpSymbol ( PUXlationContext &  ctxt)

Definition at line 1719 of file xaif2whirl.cxx.

References GetOrCreateSymbol().

Referenced by xaif2whirl::XlateStmt::xlate_InlinableSubroutineCall().

Here is the call graph for this function:

fortTkSupport::Symbol * xaif2whirl::GetOrCreateSymbol ( const char *  sname,
PUXlationContext &  ctxt 
)
unsigned int xaif2whirl::GetPositionAttr ( const xercesc::DOMElement *  elem)
PREG_IDX xaif2whirl::GetPregId ( const xercesc::DOMElement *  elem)
xercesc::DOMElement* xaif2whirl::GetPrevSiblingElement ( const xercesc::DOMNode *  n)
DOMElement* xaif2whirl::GetPrevSiblingElement ( const DOMNode *  n)

Definition at line 222 of file XAIF_DOMFilters.cxx.

References OA::n, and NULL.

Referenced by FindIntervalBoundary(), and FindNextStmtInterval().

fortTkSupport::PUId xaif2whirl::GetPUId ( const xercesc::DOMElement *  elem)

Definition at line 1944 of file xaif2whirl.cxx.

References XAIFStringRepository::tag_PUId(), and XAIFStrings.

Referenced by TranslateCFG().

Here is the call graph for this function:

OA::OA_ptr<std::list<OA::OA_ptr<OA::DGraph::NodeInterface> > > xaif2whirl::getReversePostDFSList ( OA::OA_ptr< OA::DGraph::DGraphInterface cfg)

for the back translation of unstructured control flow graphs this behaves like normal reversePostDFS order (as it was implemented in OpenAnalysis) with the one exception that we the successor nodes of a given loop node are ordered such that the node to loop successor (not the loop body) comes first in the DFS search (see the logic in getOrderedSinkNodesList). This removes the scenario of an EXIT node being placed in the middle of the list of blocks that are being connected via gotos (which consequently rather than exiting leads to continued execution of the next block that happens to follow the EXIT node in the list).

Definition at line 849 of file xaif2whirl.cxx.

References OA::DGraph::NodesIteratorInterface::current(), OA::DGraph::DGraphInterface::getEntryNodesIterator(), OA::DGraph::DGraphInterface::getNodesIterator(), getReversePostDFSListR(), and OA::DGraph::NodesIteratorInterface::isValid().

Referenced by xlate_CFGunstruct().

Here is the call graph for this function:

void xaif2whirl::getReversePostDFSListR ( OA::OA_ptr< OA::DGraph::DGraphInterface cfg,
OA::OA_ptr< OA::DGraph::NodeInterface pNode,
std::map< OA::OA_ptr< OA::DGraph::NodeInterface >, bool > &  visitMap,
OA::OA_ptr< std::list< OA::OA_ptr< OA::DGraph::NodeInterface > > >  pList 
)

for the back translation of unstructured control flow graphs

Definition at line 810 of file xaif2whirl.cxx.

References OA::OA_ptr< T >::convert(), xaif2whirl::MyDGNode::GetElem(), getOrderedSinkNodesList(), and OA::n.

Referenced by getReversePostDFSList().

Here is the call graph for this function:

OA::OA_ptr< MyDGNode > xaif2whirl::GetSuccessor ( OA::OA_ptr< MyDGNode >  node,
bool  succIsOutEdge 
)
OA::OA_ptr< MyDGNode > xaif2whirl::GetSuccessorAlongEdge ( OA::OA_ptr< MyDGNode >  node,
unsigned int  condition,
bool  succIsOutEdge 
)
fortTkSupport::SymId xaif2whirl::GetSymId ( const xercesc::DOMElement *  elem)

Definition at line 1939 of file xaif2whirl.cxx.

References XAIFStringRepository::tag_SymId(), and XAIFStrings.

Referenced by xaif2whirl::XlateStmt::xlate_SubroutineCall(), and xlate_Symbol().

Here is the call graph for this function:

fortTkSupport::SymTabId xaif2whirl::GetSymTabId ( const xercesc::DOMElement *  elem)

Definition at line 1934 of file xaif2whirl.cxx.

References XAIFStringRepository::tag_SymTabId(), and XAIFStrings.

Referenced by xlate_Scope().

Here is the call graph for this function:

fortTkSupport::WNId xaif2whirl::GetWNId ( const xercesc::DOMElement *  elem)

Definition at line 1949 of file xaif2whirl.cxx.

References XAIFStringRepository::tag_WHIRLId(), and XAIFStrings.

Referenced by FindIntervalBoundary(), FindNextStmtInterval(), TranslateBasicBlock(), TranslateCFG(), xlate_BasicBlock_OLD(), and xlate_Symbol().

Here is the call graph for this function:

fortTkSupport::IdList< fortTkSupport::WNId > * xaif2whirl::GetWNIdList ( const xercesc::DOMElement *  elem)

Definition at line 1955 of file xaif2whirl.cxx.

References XAIFStringRepository::tag_WHIRLId(), and XAIFStrings.

Referenced by TranslateBasicBlock(), xlate_BasicBlock_OLD(), and xlate_BBCond_OLD().

Here is the call graph for this function:

bool xaif2whirl::IsTagPresent ( const xercesc::DOMElement *  elem,
const char *  tag 
)

Definition at line 1918 of file xaif2whirl.cxx.

References XAIFStringRepository::attr_annot_x(), xaif2whirl::XercesStrX::c_str(), NULL, and XAIFStrings.

Referenced by TranslateBasicBlock().

Here is the call graph for this function:

bool xaif2whirl::IsTagPresent ( const char *  annotstr,
const char *  tag 
)

Definition at line 1928 of file xaif2whirl.cxx.

References NULL.

static int xaif2whirl::main_DOM ( PU_Info pu_forest,
const char *  xaiffilenm,
bool  validate 
)
static
static int xaif2whirl::main_SAX ( PU_Info pu_forest,
const char *  xaiffilenm,
bool  validate 
)
static
std::ostream& xaif2whirl::operator<< ( std::ostream &  os,
const xercesc::DOMElement &  elem 
)
std::ostream& xaif2whirl::operator<< ( std::ostream &  os,
const XMLCh *const  toDump 
)
inline

Definition at line 42 of file XercesStrX.h.

References xaif2whirl::XercesStrX::DumpXMLStr().

Here is the call graph for this function:

std::ostream& xaif2whirl::operator<< ( std::ostream &  os,
const DOMElement &  elem 
)

Definition at line 47 of file XAIF_DOMFilters.cxx.

References XercesPrintNode().

Here is the call graph for this function:

std::ostream& xaif2whirl::operator<< ( std::ostream &  os,
const XercesStrX &  toDump 
)
inline

Definition at line 49 of file XercesStrX.h.

References xaif2whirl::XercesStrX::c_str().

Here is the call graph for this function:

static void xaif2whirl::RemoveFromWhirlIdMaps ( WN wn,
fortTkSupport::WNToWNIdMap wn2idmap,
fortTkSupport::WNIdToWNMap id2wnmap 
)
static

Definition at line 1655 of file xaif2whirl.cxx.

References WN_TREE_CONTAINER< order >::begin(), WN_TREE_CONTAINER< order >::end(), and WN_TREE_ITER_base< WHIRL >::Wn().

Referenced by xlate_BasicBlock_OLD().

Here is the call graph for this function:

static WN * xaif2whirl::TranslateBasicBlock ( WN wn_pu,
const xercesc::DOMElement *  bbElem,
PUXlationContext &  ctxt,
bool  skipMarkeredGotoAndLabels,
unsigned  endLabel 
)
static
static void xaif2whirl::TranslateBB_OLD ( WN wn_pu,
const xercesc::DOMElement *  bbElem,
PUXlationContext &  ctxt 
)
static
static void xaif2whirl::TranslateCFG ( WN wn_pu,
const xercesc::DOMElement *  cfgElem,
PUXlationContext &  ctxt 
)
static

Definition at line 361 of file xaif2whirl.cxx.

References ALG_BB_PATCHING, XAIFStringRepository::attr_intent_x(), XAIFStringRepository::attr_placeholder_x(), XAIFStringRepository::attr_structured_x(), xaif2whirl::XercesStrX::c_str(), Clear_ST_is_intent_in_argument(), Clear_ST_is_intent_out_argument(), OA::OA_ptr< T >::convert(), CreateCFGraph(), CreateOpenADReplacementBeg(), CreateOpenADReplacementEnd(), fortTkSupport::CreateWhirlIdMaps(), OA::DGraph::NodesIteratorInterface::current(), Current_PU_Info, XAIFStringRepository::elem_ArgList_x(), XAIFStringRepository::elem_ArgSymRef_x(), XAIFStringRepository::elem_Replacement_x(), filter(), fortTkSupport::BaseMap< FromTy, ToTy >::Find(), xaif2whirl::PUXlationContext::findWN(), FORTTK_DIE, GetBoolAttr(), GetChildElement(), OA::DGraph::DGraphInterface::getEntryNodesIterator(), GetNextSiblingElement(), fortTkSupport::Symbol::GetST(), GetSymbol(), GetWNId(), xaif2whirl::XAIF_CFGElemFilter::IsReplaceList(), xaif2whirl::XAIF_CFGElemFilter::IsReplacement(), OA::DGraph::NodesIteratorInterface::isValid(), NULL, opt_algorithm, Set_ST_is_intent_in_argument(), Set_ST_is_intent_out_argument(), xaif2whirl::PUXlationContext::setWNIdToWNMap(), xaif2whirl::PUXlationContext::setWNParentMap(), xaif2whirl::PUXlationContext::setWNToWNIdMap(), TranslateBB_OLD(), WN_CreateBlock(), WN_Delete, WN_DELETE_FromBlock(), WN_EXTRACT_FromBlock(), WN_first(), WN_func_body, WN_INSERT_BlockFirst, WN_INSERT_BlockLast, WN_next(), WN_Set_Parm_By_Reference, WN_Set_Parm_In, WN_Set_Parm_Out, WNIdToWNTableMap, XAIFStrings, and xlate_CFG().

Referenced by xaif2whirl::XAIF_SAXHandler::endElement(), and TranslateCFG().

Here is the call graph for this function:

void xaif2whirl::TranslateCFG ( PU_Info pu_forest,
const xercesc::DOMElement *  cfgElem,
PUXlationContext &  ctxt 
)
void xaif2whirl::TranslateIR ( PU_Info pu_forest,
const xercesc::DOMDocument *  doc 
)
static FLD_HANDLE xaif2whirl::TY_Lookup_FLD ( TY_IDX  struct_ty,
TY_IDX  ref_ty,
UINT64  ref_ofst,
unsigned short  eqInst = 1 
)
static

Definition at line 2671 of file xaif2whirl.cxx.

References FALSE, FLD_last_field(), FLD_ofst(), FLD_type(), Make_fld_iter(), Stab_Identical_Types(), TRUE, and TY_fld().

Referenced by ConvertToActiveType().

Here is the call graph for this function:

TYPE_ID xaif2whirl::XAIFFETypeToWHIRLMTy ( const char *  anFETypeName)

Definition at line 2763 of file xaif2whirl.cxx.

References MTYPE_UNKNOWN, and Name_To_Mtype().

Referenced by CreateST(), and xaif2whirl::XlateExpression::translateConstant().

Here is the call graph for this function:

static TY_IDX xaif2whirl::XAIFTyToWHIRLTy ( const char *  type,
const TYPE_ID  mtype 
)
static
void xaif2whirl::XercesDumpNode ( const xercesc::DOMNode *  n)
void xaif2whirl::XercesDumpNode ( const DOMNode *  n)

Definition at line 55 of file XAIF_DOMFilters.cxx.

References XercesPrintNode().

Referenced by XercesDumpNode().

Here is the call graph for this function:

void xaif2whirl::XercesDumpNode ( void *  n)

Definition at line 69 of file XAIF_DOMFilters.cxx.

References XercesDumpNode().

Here is the call graph for this function:

void xaif2whirl::XercesDumpTree ( const xercesc::DOMNode *  n)
void xaif2whirl::XercesDumpTree ( const DOMNode *  n)

Definition at line 62 of file XAIF_DOMFilters.cxx.

References XercesPrintTree().

Referenced by XercesDumpTree().

Here is the call graph for this function:

void xaif2whirl::XercesDumpTree ( void *  n)

Definition at line 76 of file XAIF_DOMFilters.cxx.

References XercesDumpTree().

Here is the call graph for this function:

static int xaif2whirl::XercesFini ( )
static

Definition at line 234 of file main.cxx.

References Terminate().

Referenced by real_main().

Here is the call graph for this function:

static int xaif2whirl::XercesInit ( )
static

Definition at line 218 of file main.cxx.

Referenced by real_main().

void xaif2whirl::XercesPrintNode ( std::ostream &  os,
const xercesc::DOMNode *  n 
)
static void xaif2whirl::XercesPrintNode ( std::ostream &  os,
const DOMNode *  n,
int  iter 
)
static

Definition at line 83 of file XAIF_DOMFilters.cxx.

References OA::n, and val.

Referenced by operator<<(), XercesDumpNode(), XercesPrintNode(), and XercesPrintTree().

void xaif2whirl::XercesPrintNode ( std::ostream &  os,
const DOMNode *  n 
)

Definition at line 31 of file XAIF_DOMFilters.cxx.

References XercesPrintNode().

Here is the call graph for this function:

void xaif2whirl::XercesPrintTree ( std::ostream &  os,
const xercesc::DOMNode *  n 
)
static void xaif2whirl::XercesPrintTree ( std::ostream &  os,
const DOMNode *  n,
int  ilevel 
)
static

Definition at line 119 of file XAIF_DOMFilters.cxx.

References XercesPrintNode().

Referenced by XercesDumpTree(), and XercesPrintTree().

Here is the call graph for this function:

void xaif2whirl::XercesPrintTree ( std::ostream &  os,
const DOMNode *  n 
)

Definition at line 39 of file XAIF_DOMFilters.cxx.

References XercesPrintTree().

Here is the call graph for this function:

static void xaif2whirl::xlate_BBCond_OLD ( WN wn_pu,
const xercesc::DOMElement *  bbElem,
PUXlationContext &  ctxt 
)
static
static WN* xaif2whirl::xlate_CFG ( WN wn_pu,
OA::OA_ptr< OA::DGraph::DGraphInterface cfg,
OA::OA_ptr< MyDGNode >  root,
PUXlationContext &  ctxt,
unsigned &  startLabel_r,
bool  structuredCF 
)
static

Referenced by TranslateCFG().

static WN* xaif2whirl::xlate_CFG ( WN wn_pu,
OA::OA_ptr< OA::DGraph::DGraphInterface cfg,
OA::OA_ptr< MyDGNode >  root,
PUXlationContext &  ctxt,
unsigned int &  startLabel_r,
bool  structuredCF 
)
static

Definition at line 535 of file xaif2whirl.cxx.

References WN::first, NULL, xlate_CFGstruct(), and xlate_CFGunstruct().

Here is the call graph for this function:

static WN * xaif2whirl::xlate_CFG_BasicBlock ( WN wn_pu,
OA::OA_ptr< MyDGNode >  curBB,
PUXlationContext &  ctxt,
bool  skipMarkeredGotoAndLabels,
unsigned  newCurBBLbl,
unsigned  newNextBBLbl,
unsigned  endLabel 
)
static

Definition at line 1169 of file xaif2whirl.cxx.

References xaif2whirl::MyDGNode::GetElem(), NULL, TranslateBasicBlock(), WN_CreateGoto(), WN_CreateLabel(), WN_INSERT_BlockFirst, and WN_INSERT_BlockLast.

Referenced by xlate_CFGstruct(), and xlate_CFGunstruct().

Here is the call graph for this function:

static WN * xaif2whirl::xlate_CFG_BranchMulti ( OA::OA_ptr< MyDGNode >  curNode,
WN condWN,
unsigned  lastLbl,
vector< OA::OA_ptr< MyDGEdge > > &  outedges,
map< OA::OA_ptr< MyDGNode >, unsigned > &  nodeToLblMap 
)
static
static pair< WN *, OA::OA_ptr< MyDGNode > > xaif2whirl::xlate_CFGstruct ( WN wn_pu,
OA::OA_ptr< OA::DGraph::DGraphInterface cfg,
OA::OA_ptr< MyDGNode >  startNode,
set< xercesc::DOMElement * > &  xlated,
PUXlationContext &  ctxt,
unsigned int &  startLabel_r 
)
static
static WN * xaif2whirl::xlate_CFGunstruct ( WN wn_pu,
OA::OA_ptr< OA::DGraph::DGraphInterface cfg,
OA::OA_ptr< MyDGNode >  startNode,
set< xercesc::DOMElement * > &  xlated,
PUXlationContext &  ctxt,
unsigned int &  startLabel_r 
)
static

Definition at line 877 of file xaif2whirl.cxx.

References XAIFStringRepository::attr_lineNumber_x(), xaif2whirl::XercesStrX::c_str(), OA::OA_ptr< T >::convert(), CreateIfCondition(), OA::DGraph::EdgesIteratorInterface::current(), XAIFStringRepository::elem_Condition_x(), XAIFStringRepository::elem_LpInit_x(), XAIFStringRepository::elem_LpUpdate_x(), FORTTK_DIE, FORTTK_MSG, GetChildElement(), xaif2whirl::MyDGNode::GetElem(), GetFirstChildElement(), OA::DGraph::NodeImplement::getOutgoingEdgesIterator(), getReversePostDFSList(), GetSuccessor(), GetSuccessorAlongEdge(), xaif2whirl::XAIF_BBElemFilter::IsBB(), xaif2whirl::XAIF_BBElemFilter::IsBBBranch(), xaif2whirl::XAIF_BBElemFilter::IsBBEndBr(), xaif2whirl::XAIF_BBElemFilter::IsBBEndLoop(), xaif2whirl::XAIF_BBElemFilter::IsBBEntry(), xaif2whirl::XAIF_BBElemFilter::IsBBExit(), xaif2whirl::XAIF_BBElemFilter::IsBBForLoop(), xaif2whirl::XAIF_BBElemFilter::IsBBPostLoop(), xaif2whirl::XAIF_BBElemFilter::IsBBPreLoop(), OA::DGraph::EdgesIteratorInterface::isValid(), OA::n, NULL, OA::DGraph::NodeImplement::num_outgoing(), OA::OA_ptr< T >::ptrEqual(), xaif2whirl::XlateExpression::translateExpression(), xaif2whirl::XlateExpression::translateExpressionSimple(), xaif2whirl::XlateStmt::translateStmt(), WN_CreateBlock(), WN_CreateGoto(), WN_CreateIf(), WN_CreateLabel(), WN_INSERT_BlockFirst, WN_INSERT_BlockLast, XAIFStrings, xlate_CFG_BasicBlock(), and xlate_CFG_BranchMulti().

Referenced by xlate_CFG().

Here is the call graph for this function:

static void xaif2whirl::xlate_SymbolTable ( const xercesc::DOMElement *  elem,
const char *  scopeId,
PU_Info pu,
PUXlationContext &  ctxt 
)
static

Definition at line 1755 of file xaif2whirl.cxx.

References GetChildElement(), GetNextSiblingElement(), and xlate_Symbol().

Referenced by xlate_Scope().

Here is the call graph for this function:

Variable Documentation

fortTkSupport::IntrinsicXlationTable xaif2whirl::IntrinsicTable
AlgorithmType xaif2whirl::opt_algorithm = ALG_NULL

Definition at line 85 of file main.cxx.

Referenced by real_main(), and TranslateCFG().

fortTkSupport::WNIdToWNTabMap xaif2whirl::WNIdToWNTableMap