OpenADFortTk (basic)
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 WN * 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 WN * TranslateBasicBlock (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 WN * FindIntervalBoundary (const xercesc::DOMElement *elem, fortTkSupport::IdList< fortTkSupport::WNId > *bbIdList, fortTkSupport::WNIdToWNMap *wnmap, WN *blkWN, int boundary)
static WN * FindWNBlock (const xercesc::DOMElement *bbElem, fortTkSupport::IdList< fortTkSupport::WNId > *idlist, PUXlationContext &ctxt)
static WN * FindSafeInsertionPoint (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 WN * CreateOpenADReplacementBeg (const char *placeholder)
static WN * CreateOpenADReplacementEnd ()
static WN * CreateIfCondition (WN *condWN)
static ST * CreateST (const xercesc::DOMElement *elem, SYMTAB_IDX level, const char *nm, fortTkSupport::XAIFSymToSymbolMap &symMap, const char *scopeId)
static ST * ConvertIntoGlobalST (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 WN * xlate_CFG_BasicBlock (WN *wn_pu, OA::OA_ptr< MyDGNode > curBB, PUXlationContext &ctxt, bool skipMarkeredGotoAndLabels, unsigned newCurBBLbl, unsigned newNextBBLbl, unsigned endLabel)
static WN * 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 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 WN * 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 WN * 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)
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)
WN * CreateCallToIntrin (TYPE_ID rtype, const char *fname, unsigned int argc)
WN * CreateCallToIntrin (TYPE_ID rtype, const char *fname, std::vector< WN * > &args)
WN * CreateIntrinsicCall (OPERATOR opr, INTRINSIC intrn, TYPE_ID rtype, TYPE_ID dtype, std::vector< WN * > &args)
WN * CreateBoolConst (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)
WN * CreateParm (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

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

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]

Definition at line 2362 of file xaif2whirl.cxx.

References SexpTags::ST, and SexpTags::TY.

static void xaif2whirl::ConvertScalarizedRefToActiveType ( WN *  wn) [static]

Definition at line 2622 of file xaif2whirl.cxx.

References ConvertStructMemberToActiveType(), FORTTK_ASSERT, TY_Is_Array(), WN_GetBaseObjType(), and WN_GetRefObjType().

Referenced by xlate_Symbol().

Here is the call graph for this function:

static void xaif2whirl::ConvertStructMemberToActiveType ( TY_IDX  base_ty,
TY_IDX  ref_ty,
UINT  field_id 
) [static]
static void xaif2whirl::ConvertToActiveType ( ST *  st) [static]

Definition at line 2447 of file xaif2whirl.cxx.

References ActiveTypeInitializedTyIdx, ActiveTypeTyIdx, FORTTK_DIE, FORTTK_WMSG, Stab_Is_Common_Block(), Stab_Is_Equivalence_Block(), Stab_Is_Valid_Base(), and TY_Lookup_FLD().

Referenced by xlate_Symbol().

Here is the call graph for this function:

WN * xaif2whirl::CreateBoolConst ( unsigned int  val)

Definition at line 2145 of file xaif2whirl.cxx.

References SexpTags::ST.

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

WN * xaif2whirl::CreateCallToIntrin ( TYPE_ID  rtype,
const char *  fname,
std::vector< WN * > &  args 
)

Definition at line 2095 of file xaif2whirl.cxx.

References CreateCallToIntrin(), CreateParm(), TY_Is_Character_Reference(), TY_Is_Chararray_Reference(), and WN_Tree_Type().

Here is the call graph for this function:

static OA::OA_ptr< OA::DGraph::DGraphInterface > xaif2whirl::CreateCFGraph ( const xercesc::DOMElement *  elem) [static]
static WN * xaif2whirl::CreateIfCondition ( WN *  condWN) [static]

Definition at line 2183 of file xaif2whirl.cxx.

References WN_Tree_Type().

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 
)
static WN * xaif2whirl::CreateOpenADReplacementBeg ( const char *  placeholder) [static]

Definition at line 2162 of file xaif2whirl.cxx.

Referenced by TranslateCFG().

static WN * xaif2whirl::CreateOpenADReplacementEnd ( ) [static]

Definition at line 2172 of file xaif2whirl.cxx.

Referenced by TranslateCFG().

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::DumpDotGraph ( std::ostream &  os,
OA::OA_ptr< OA::DGraph::DGraphInterface >  graph 
)

Definition at line 2904 of file xaif2whirl.cxx.

References DumpDotGraph_GetNodeName().

Referenced by DDumpDotGraph().

Here is the call graph for this function:

static std::string xaif2whirl::DumpDotGraph_GetNodeName ( OA::OA_ptr< MyDGNode >  n) [static]

Definition at line 2930 of file xaif2whirl.cxx.

References XAIFStringRepository::attr_Vid_x(), xaif2whirl::XercesStrX::c_str(), Num2Str(), and XAIFStrings.

Referenced by DumpDotGraph().

Here is the call graph for this function:

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.

Referenced by xlate_BasicBlock_OLD().

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(), and xaif2whirl::PUXlationContext::findWN().

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.

unsigned int xaif2whirl::GetChildElementCount ( const xercesc::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(), 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, 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(), 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, 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().

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.

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 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().

Here is the call graph for this function:

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 
)
OA::OA_ptr<std::list<OA::OA_ptr<OA::DGraph::NodeInterface> > > xaif2whirl::getOrderedSinkNodesList ( OA::OA_ptr< OA::DGraph::DGraphInterface >  cfg,
OA::OA_ptr< OA::DGraph::NodeInterface >  pNode 
)

for the back translation of unstructured control flow graphs

Definition at line 773 of file xaif2whirl.cxx.

References GetCondAttr(), xaif2whirl::MyDGNode::GetElem(), GetHasConditionAttr(), xaif2whirl::XAIF_BBElemFilter::IsBBForLoop(), and xaif2whirl::XAIF_BBElemFilter::IsBBPostLoop().

Referenced by getReversePostDFSListR().

Here is the call graph for this function:

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.

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 getReversePostDFSListR().

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 xaif2whirl::MyDGNode::GetElem(), and getOrderedSinkNodesList().

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 
)

Definition at line 2809 of file xaif2whirl.cxx.

References FORTTK_DIE, GetCondAttr(), xaif2whirl::MyDGEdge::GetElem(), and fortTkSupport::Diagnostics::Unimplemented.

Referenced by xlate_CFGstruct(), and xlate_CFGunstruct().

Here is the call graph for this function:

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(), 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.

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]
static TY_IDX xaif2whirl::MY_Make_Array_Type ( TY_IDX  elem_ty,
INT32  ndim,
bool  fixed,
const INT64 *  lower,
const INT64 *  upper 
) [static]

Definition at line 2699 of file xaif2whirl.cxx.

References FORTTK_ASSERT, and SexpTags::TY.

Referenced by CreateST().

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.

Referenced by xlate_BasicBlock_OLD().

static void xaif2whirl::TranslateBB_OLD ( WN *  wn_pu,
const xercesc::DOMElement *  bbElem,
PUXlationContext &  ctxt 
) [static]
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 Stab_Identical_Types().

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.

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

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.

Referenced by real_main().

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.

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 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 TranslateBasicBlock().

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]

Definition at line 1205 of file xaif2whirl.cxx.

References GetCondAttr(), and GetHasConditionAttr().

Referenced by xlate_CFGstruct(), and xlate_CFGunstruct().

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

Definition at line 85 of file main.cxx.

Referenced by real_main(), and TranslateCFG().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines