OpenADFortTk (basic)
src/lib/support/Open64IRInterface/wn_attr.h
Go to the documentation of this file.
00001 // -*-Mode: C++;-*-
00002 #ifndef wn_attr_INCLUDED
00003 #define wn_attr_INCLUDED
00004 
00005 #include "Open64BasicTypes.h"
00006 
00007 
00015 /* several craylib/dope items represent a no-op by a zero inconst...*/
00016 #define IS_IO_NULL_OPR(wn) ((WN_operator(wn) == OPR_INTCONST) && (WN_const_val(wn) == 0))
00017 
00018 #define WN_IOITEM(x) ((IOITEM) WN_io_item(x))
00019 #define WN_IOSTMT(x) ((IOSTATEMENT) WN_io_statement(x))
00020 
00021 #define IS_IO_ITEM_IOU(item) \
00022    (WN_IOITEM(item) >= IOU_NONE && WN_IOITEM(item) <= IOU_INTERNAL)
00023 #define IS_IO_ITEM_IOF(item) \
00024    ((WN_IOITEM(item) >= IOF_NONE && WN_IOITEM(item) <= IOF_CR_FMTSRC_DOPE))
00025 #define IS_IO_ITEM_IOC(item) \
00026    (WN_IOITEM(item) >= IOC_ACCESS && WN_IOITEM(item) <= IOC_ERRFLAG)
00027 #define IS_IO_ITEM_IOL(item) \
00028    ((WN_IOITEM(item) >= IOL_ARRAY && WN_IOITEM(item) <= IOL_VAR) || \
00029     (WN_IOITEM(item) == IOL_DOPE))
00030 
00034 #define INTR_is_adrtmp(intrn) \
00035    ((intrn) == INTRN_U4I1ADRTMP || \
00036     (intrn) == INTRN_U4I2ADRTMP || \
00037     (intrn) == INTRN_U4I4ADRTMP || \
00038     (intrn) == INTRN_U4I8ADRTMP || \
00039     (intrn) == INTRN_U4F4ADRTMP || \
00040     (intrn) == INTRN_U4F8ADRTMP || \
00041     (intrn) == INTRN_U4FQADRTMP || \
00042     (intrn) == INTRN_U4C4ADRTMP || \
00043     (intrn) == INTRN_U4C8ADRTMP || \
00044     (intrn) == INTRN_U4CQADRTMP || \
00045     (intrn) == INTRN_U4VADRTMP  || \
00046     (intrn) == INTRN_U8I1ADRTMP || \
00047     (intrn) == INTRN_U8I2ADRTMP || \
00048     (intrn) == INTRN_U8I4ADRTMP || \
00049     (intrn) == INTRN_U8I8ADRTMP || \
00050     (intrn) == INTRN_U8F4ADRTMP || \
00051     (intrn) == INTRN_U8F8ADRTMP || \
00052     (intrn) == INTRN_U8FQADRTMP || \
00053     (intrn) == INTRN_U8C4ADRTMP || \
00054     (intrn) == INTRN_U8C8ADRTMP || \
00055     (intrn) == INTRN_U8CQADRTMP || \
00056     (intrn) == INTRN_U8VADRTMP)
00057 
00061 #define INTR_is_valtmp(intrn) \
00062    ((intrn) == INTRN_I4VALTMP || \
00063     (intrn) == INTRN_I8VALTMP || \
00064     (intrn) == INTRN_F4VALTMP || \
00065     (intrn) == INTRN_F8VALTMP || \
00066     (intrn) == INTRN_FQVALTMP || \
00067     (intrn) == INTRN_C4VALTMP || \
00068     (intrn) == INTRN_C8VALTMP || \
00069     (intrn) == INTRN_CQVALTMP)
00070 
00071 #define WN_Skip_Parm(arg) \
00072    ((arg)!=NULL && WN_operator(arg) == OPR_PARM? WN_kid0(arg) : arg)
00073 
00074 
00093 extern TY_IDX 
00094 WN_Tree_Type(const WN *wn);
00095 
00096 extern TY_IDX 
00097 Get_Field_Type(TY_IDX base, int field_id);
00098 
00105 extern TY_IDX 
00106 WN_GetRefObjType(const WN* wn);
00107 
00113 extern TY_IDX 
00114 WN_GetBaseObjType(const WN* wn);
00115 
00122 extern TY_IDX 
00123 WN_GetExprType(const WN* wn);
00124 
00125 extern TY_IDX 
00126 WN_Call_Type(const WN* wn);
00127 
00128 extern TY_IDX 
00129 WN_Call_Return_Type(const WN* wn);
00130 
00131 extern INT
00132 WN_Call_First_Arg_Idx(const WN* wn);
00133 
00134 extern INT
00135 WN_Call_Last_Arg_Idx(const WN* wn);
00136 
00141 extern const char * 
00142 WN_intrinsic_name(INTRINSIC intr_opc);
00143 
00149 extern TY_IDX 
00150 WN_intrinsic_return_ty(const WN *call);
00151 
00156 extern BOOL 
00157 WN_intrinsic_return_to_param(TY_IDX return_ty);
00158 
00168 extern WN *
00169 WN_Get_PtrAdd_Intconst(WN* wn0, WN* wn1, TY_IDX pointed_ty);
00170 
00171 #endif 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines