OpenADFortTk (including Open64 and OpenAnalysis references)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
wn_attr.h
Go to the documentation of this file.
1 // -*-Mode: C++;-*-
2 #ifndef wn_attr_INCLUDED
3 #define wn_attr_INCLUDED
4 
5 #include "Open64BasicTypes.h"
6 
7 
15 /* several craylib/dope items represent a no-op by a zero inconst...*/
16 #define IS_IO_NULL_OPR(wn) ((WN_operator(wn) == OPR_INTCONST) && (WN_const_val(wn) == 0))
17 
18 #define WN_IOITEM(x) ((IOITEM) WN_io_item(x))
19 #define WN_IOSTMT(x) ((IOSTATEMENT) WN_io_statement(x))
20 
21 #define IS_IO_ITEM_IOU(item) \
22  (WN_IOITEM(item) >= IOU_NONE && WN_IOITEM(item) <= IOU_INTERNAL)
23 #define IS_IO_ITEM_IOF(item) \
24  ((WN_IOITEM(item) >= IOF_NONE && WN_IOITEM(item) <= IOF_CR_FMTSRC_DOPE))
25 #define IS_IO_ITEM_IOC(item) \
26  (WN_IOITEM(item) >= IOC_ACCESS && WN_IOITEM(item) <= IOC_ERRFLAG)
27 #define IS_IO_ITEM_IOL(item) \
28  ((WN_IOITEM(item) >= IOL_ARRAY && WN_IOITEM(item) <= IOL_VAR) || \
29  (WN_IOITEM(item) == IOL_DOPE))
30 
34 #define INTR_is_adrtmp(intrn) \
35  ((intrn) == INTRN_U4I1ADRTMP || \
36  (intrn) == INTRN_U4I2ADRTMP || \
37  (intrn) == INTRN_U4I4ADRTMP || \
38  (intrn) == INTRN_U4I8ADRTMP || \
39  (intrn) == INTRN_U4F4ADRTMP || \
40  (intrn) == INTRN_U4F8ADRTMP || \
41  (intrn) == INTRN_U4FQADRTMP || \
42  (intrn) == INTRN_U4C4ADRTMP || \
43  (intrn) == INTRN_U4C8ADRTMP || \
44  (intrn) == INTRN_U4CQADRTMP || \
45  (intrn) == INTRN_U4VADRTMP || \
46  (intrn) == INTRN_U8I1ADRTMP || \
47  (intrn) == INTRN_U8I2ADRTMP || \
48  (intrn) == INTRN_U8I4ADRTMP || \
49  (intrn) == INTRN_U8I8ADRTMP || \
50  (intrn) == INTRN_U8F4ADRTMP || \
51  (intrn) == INTRN_U8F8ADRTMP || \
52  (intrn) == INTRN_U8FQADRTMP || \
53  (intrn) == INTRN_U8C4ADRTMP || \
54  (intrn) == INTRN_U8C8ADRTMP || \
55  (intrn) == INTRN_U8CQADRTMP || \
56  (intrn) == INTRN_U8VADRTMP)
57 
61 #define INTR_is_valtmp(intrn) \
62  ((intrn) == INTRN_I4VALTMP || \
63  (intrn) == INTRN_I8VALTMP || \
64  (intrn) == INTRN_F4VALTMP || \
65  (intrn) == INTRN_F8VALTMP || \
66  (intrn) == INTRN_FQVALTMP || \
67  (intrn) == INTRN_C4VALTMP || \
68  (intrn) == INTRN_C8VALTMP || \
69  (intrn) == INTRN_CQVALTMP)
70 
71 #define WN_Skip_Parm(arg) \
72  ((arg)!=NULL && WN_operator(arg) == OPR_PARM? WN_kid0(arg) : arg)
73 
74 
93 extern TY_IDX
94 WN_Tree_Type(const WN *wn);
95 
96 extern TY_IDX
97 Get_Field_Type(TY_IDX base, int field_id);
98 
105 extern TY_IDX
106 WN_GetRefObjType(const WN* wn);
107 
113 extern TY_IDX
114 WN_GetBaseObjType(const WN* wn);
115 
122 extern TY_IDX
123 WN_GetExprType(const WN* wn);
124 
125 extern TY_IDX
126 WN_Call_Type(const WN* wn);
127 
128 extern TY_IDX
129 WN_Call_Return_Type(const WN* wn);
130 
131 extern INT
132 WN_Call_First_Arg_Idx(const WN* wn);
133 
134 extern INT
135 WN_Call_Last_Arg_Idx(const WN* wn);
136 
141 extern const char *
142 WN_intrinsic_name(INTRINSIC intr_opc);
143 
149 extern TY_IDX
150 WN_intrinsic_return_ty(const WN *call);
151 
156 extern BOOL
158 
168 extern WN *
169 WN_Get_PtrAdd_Intconst(WN* wn0, WN* wn1, TY_IDX pointed_ty);
170 
171 #endif