OpenADFortTk (basic)
src/sexp2whirl/sexp2wn.h
Go to the documentation of this file.
00001 // -*-Mode: C++;-*-
00002 // $Header: /m_home/m_utkej/Argonne/cvs2svn/cvs/OpenADFortTk/src/sexp2whirl/sexp2wn.h,v 1.6 2007-10-08 18:28:34 utke Exp $
00003 
00004 //***************************************************************************
00005 //
00006 // File:
00007 //   $Source: /m_home/m_utkej/Argonne/cvs2svn/cvs/OpenADFortTk/src/sexp2whirl/sexp2wn.h,v $
00008 //
00009 // Purpose:
00010 //   [The purpose of this file]
00011 //
00012 // Description:
00013 //   [The set of functions, macros, etc. defined in the file]
00014 //
00015 //***************************************************************************
00016 
00017 #ifndef sexp2wn_h
00018 #define sexp2wn_h
00019 
00020 //************************** System Include Files ***************************
00021 
00022 #include <vector> // STL
00023 #include <list>   // STL
00024 
00025 //*************************** Sexp Include Files ****************************
00026 
00027 #include <sexp.h>
00028 
00029 //************************** Open64 Include Files ***************************
00030 
00031 #include "Open64IRInterface/Open64BasicTypes.h"
00032 
00033 //*************************** User Include Files ****************************
00034 
00035 #include "sexp2whirl.i"
00036 
00037 //************************** Forward Declarations ***************************
00038 
00039 //***************************************************************************
00040 // Commonly used WHIRL translation functions
00041 //***************************************************************************
00042 
00043 namespace sexp2whirl {
00044     
00045   // Note: All routines Assume that Open64 symbol table globals are
00046   // already set.
00047 
00048   // TranslateWN: Translate the given S-expression WHIRL-AST node and
00049   // return a WN*.  If 'sx' is NULL, returns NULL.
00050   extern WN* 
00051   TranslateWN(sexp_t* sx);
00052 
00053   // TranslateWNChildren: Given a non-NULL S-expression WHIRL-AST
00054   // node, translate its children and return them in a WN-vector.
00055   extern std::vector<WN*>
00056   TranslateWNChildren(sexp_t* sx);
00057   
00058 }; /* namespace sexp2whirl */
00059 
00060 
00061 //***************************************************************************
00062 // Commonly used routines for extracting information from S-expressions
00063 //***************************************************************************
00064 
00065 namespace sexp2whirl {
00066   
00067   ST_IDX 
00068   GetWhirlSym(sexp_t* sx);
00069   
00070   TY_IDX
00071   GetWhirlTy(sexp_t* sx);
00072   
00073   OPERATOR
00074   GetWhirlOpr(sexp_t* sx);
00075   
00076   OPCODE
00077   GetWhirlOpc(sexp_t* sx);
00078   
00079   ST_IDX
00080   GetWhirlSymRef(sexp_t* sx);
00081   
00082   TY_IDX
00083   GetWhirlTyUse(sexp_t* sx);
00084   
00085   const char*
00086   GetWhirlFlg(sexp_t* sx);
00087 
00088   UINT64
00089   GetWhirlOpaqueFlg(sexp_t* sx);
00090   
00091 }; /* namespace sexp2whirl */
00092 
00093 
00094 //***************************************************************************
00095 
00096 #endif /* sexp2wn_h */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines