OpenADFortTk (basic)
src/whirl2xaif/whirl2xaif.h
Go to the documentation of this file.
00001 // -*-Mode: C++;-*-
00002 // $Header: /m_home/m_utkej/Argonne/cvs2svn/cvs/OpenADFortTk/src/whirl2xaif/whirl2xaif.h,v 1.10 2007-10-08 18:28:34 utke Exp $
00003 
00004 
00005 #ifndef whirl2xaif_h
00006 #define whirl2xaif_h
00007 
00008 #include <fstream>
00009 
00010 #include "Open64IRInterface/Open64BasicTypes.h"
00011 
00012 #include "xmlostream.h"
00013 #include "IntrinsicXlationTable.h"
00014 #include "OAMaps.h"
00015 #include "ScalarizedRefTab.h"
00016 #include "WhirlIDMaps.h"
00017 #include "Open64IRInterface/stab_attr.h"
00018 #include "Open64IRInterface/wn_attr.h"
00019 #include "Diagnostics.h"
00020 #include "PUXlationContext.h"
00021 
00022 namespace whirl2xaif {
00023   
00024   class Whirl2Xaif {
00025   public : 
00026     static void translateIR(std::ostream& os, 
00027                             PU_Info* pu_forest,
00028                             const char* tmpVarPrefix);
00029 
00030     static fortTkSupport::IntrinsicXlationTable& getIntrinsicXlationTable();
00031     static fortTkSupport::InterOAInfoMap& getOAAnalMap();
00032     static fortTkSupport::ScalarizedRefTabMap_W2X& getScalarizedRefTableMap();
00033     static fortTkSupport::WNToWNIdTabMap& getWNToWNIdTableMap();
00034 
00035   private:
00036 
00040     Whirl2Xaif();
00041 
00042     static fortTkSupport::IntrinsicXlationTable ourIntrinsicTable;
00043     static const std::string ourDividerComment;
00044     static fortTkSupport::InterOAInfoMap ourOAAnalMap;
00045     static fortTkSupport::ScalarizedRefTabMap_W2X ourScalarizedRefTableMap;
00046     static fortTkSupport::WNToWNIdTabMap ourWNToWNIdTableMap;
00047 
00048     static void translateScopeHierarchy(xml::ostream& xos, 
00049                                         PU_Info* pu_forest, 
00050                                         PUXlationContext& ctxt);
00051 
00052     static void translateScopeHierarchyPU(xml::ostream& xos, 
00053                                           PU_Info* pu, 
00054                                           UINT32 parentId, 
00055                                           PUXlationContext& ctxt);
00056 
00057     static void translateAnalMaps(xml::ostream& xos, 
00058                                   PU_Info* pu_forest, 
00059                                   PUXlationContext& ctxt);
00060 
00061     static void translatePU(xml::ostream& xos, 
00062                             OA::OA_ptr<OA::CallGraph::Node> n, 
00063                             UINT32 vertexId, 
00064                             PUXlationContext& ctxt);
00065 
00066     static void translatePU(xml::ostream& xos, 
00067                             PU_Info *pu, 
00068                             UINT32 vertexId,
00069                             PUXlationContext& ctxt);
00070 
00071     static void translateWNPU(xml::ostream& xos, 
00072                               WN* pu, 
00073                               PUXlationContext& ctxt);
00074 
00075     static void dumpTranslationHeaderComment(xml::ostream& xos);
00076 
00077   };
00078 
00079 }
00080 
00081 #endif 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines