00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050 #ifndef CWH_AUXST_INCLUDED
00051 #define CWH_AUXST_INCLUDED
00052
00053 #ifdef _KEEP_RCS_ID
00054 #endif
00055
00056
00057 extern void cwh_auxst_register_table(void);
00058 extern void cwh_auxst_un_register_table(void);
00059 extern void cwh_auxst_alloc_container_table(void);
00060 extern void cwh_auxst_clear_per_PU(void) ;
00061 extern void cwh_auxst_free(void) ;
00062 extern void cwh_auxst_free_list (LIST ** lp) ;
00063
00064 extern void cwh_auxst_clear(ST *st);
00065
00066
00067
00068
00069
00070
00071
00072 enum list_name {
00073 l_COMLIST,
00074 l_ALTENTRY,
00075 l_RETURN_TEMPS,
00076 l_NAMELIST,
00077 l_SPLITLIST,
00078 l_EQVLIST,
00079 l_DST_COMLIST,
00080 l_DST_PARMLIST,
00081 l_TYMDLIST
00082 };
00083
00084
00085
00086
00087
00088
00089
00090 enum flags_a {
00091 f_RSLTTMP = 0x01,
00092 f_ELEM = 0x02,
00093 f_ALTENT = 0x04,
00094 f_ALTTY = 0x08,
00095 f_VISITED = 0x10,
00096 f_NONCONT = 0x20,
00097 f_AUTO_OR_CPTR = 0x40,
00098 f_F90_PTR = 0x80,
00099 f_MODULE = 0x100,
00100 f_XP_COPY = 0x200,
00101 f_IS_TMP = 0x400,
00102 f_ALLOC = 0x800,
00103 f_ASSUMED = 0x1000,
00104 f_A_SIZE = 0x2000,
00105 f_IS_RSLTTMP = 0x4000
00106 } ;
00107
00108
00109 #define Set_ST_auxst_has_rslt_tmp(st,val) cwh_auxst_set_flag(st,f_RSLTTMP,val)
00110 #define ST_auxst_has_rslt_tmp(st) cwh_auxst_read_flag(st,f_RSLTTMP)
00111
00112 #define Set_ST_auxst_is_rslt_tmp(st,val) cwh_auxst_set_flag(st,f_IS_RSLTTMP,val)
00113 #define ST_auxst_is_rslt_tmp(st) cwh_auxst_read_flag(st,f_IS_RSLTTMP)
00114
00115 #define Set_ST_auxst_is_elemental(st,val) cwh_auxst_set_flag(st,f_ELEM,val)
00116 #define ST_auxst_is_elemental(st) cwh_auxst_read_flag(st,f_ELEM)
00117
00118 #define Set_ST_auxst_is_altentry(st,val) cwh_auxst_set_flag(st,f_ALTENT,val)
00119 #define ST_auxst_is_altentry(st) cwh_auxst_read_flag(st,f_ALTENT)
00120
00121 #define Set_ST_auxst_altentry_shareTY(st,val) cwh_auxst_set_flag(st,f_ALTTY,val)
00122 #define ST_auxst_altentry_shareTY(st) cwh_auxst_read_flag(st,f_ALTTY)
00123
00124 #define Set_ST_auxst_visited(st,val) cwh_auxst_set_flag(st,f_VISITED,val)
00125 #define ST_auxst_visited(st) cwh_auxst_read_flag(st,f_VISITED)
00126
00127 #define Set_ST_auxst_is_non_contiguous(st,val) cwh_auxst_set_flag(st,f_NONCONT,val)
00128 #define ST_auxst_is_non_contiguous(st) cwh_auxst_read_flag(st,f_NONCONT)
00129
00130 #define Set_ST_auxst_is_auto_or_cpointer(st,val) cwh_auxst_set_flag(st,f_AUTO_OR_CPTR,val)
00131 #define ST_auxst_is_auto_or_cpointer(st) cwh_auxst_read_flag(st,f_AUTO_OR_CPTR)
00132
00133 #define Set_ST_auxst_is_f90_pointer(st,val) cwh_auxst_set_flag(st,f_F90_PTR,val)
00134 #define ST_auxst_is_f90_pointer(st) cwh_auxst_read_flag(st,f_F90_PTR)
00135
00136 #define Set_ST_auxst_is_module_data(st,val) cwh_auxst_set_flag(st,f_MODULE,val)
00137 #define ST_auxst_is_module_data(st) cwh_auxst_read_flag(st,f_MODULE)
00138
00139 #define Set_ST_auxst_xpragma_copyin(st,val) cwh_auxst_set_flag(st,f_XP_COPY,val)
00140 #define ST_auxst_xpragma_copyin(st) cwh_auxst_read_flag(st,f_XP_COPY)
00141
00142 #define Set_ST_auxst_is_tmp(st,val) cwh_auxst_set_flag(st,f_IS_TMP,val)
00143 #define ST_auxst_is_tmp(st) cwh_auxst_read_flag(st,f_IS_TMP)
00144
00145 #define Set_ST_auxst_is_allocatable(st,val) cwh_auxst_set_flag(st,f_ALLOC,val)
00146 #define ST_auxst_is_allocatable(st) cwh_auxst_read_flag(st,f_ALLOC)
00147
00148 #define Set_ST_auxst_is_assumed_shape(st,val) cwh_auxst_set_flag(st,f_ASSUMED,val)
00149 #define ST_auxst_is_assumed_shape(st) cwh_auxst_read_flag(st,f_ASSUMED)
00150
00151 #define Set_ST_auxst_is_assumed_size(st,val) cwh_auxst_set_flag(st,f_A_SIZE,val)
00152 #define ST_auxst_is_assumed_size(st) cwh_auxst_read_flag(st,f_A_SIZE)
00153
00154 extern void cwh_auxst_set_flag(ST * st,enum flags_a f, BOOL val) ;
00155 extern BOOL cwh_auxst_read_flag(ST * st,enum flags_a f);
00156
00157
00158
00159 struct data_info_s;
00160 extern void Set_ST_auxst_data_info(ST *st, data_info_s * data_info);
00161 extern data_info_s * ST_auxst_data_info(ST *st);
00162
00163
00164
00165
00166 extern ITEM * cwh_auxst_add_to_list(LIST ** lp, ST *st, BOOL order);
00167 extern void cwh_auxst_add_list(ST * parent, LIST *l, enum list_name list) ;
00168 extern LIST * cwh_auxst_get_list(ST * st, enum list_name list);
00169 extern void cwh_auxst_add_item(ST * parent, ST *st, enum list_name list);
00170 extern ITEM * cwh_auxst_next_element(ST * parent, ITEM *i, enum list_name list) ;
00171 extern BOOL cwh_auxst_read_flag(ST * st, enum flags_a f) ;
00172 extern void cwh_auxst_set_flag(ST * st, enum flags_a f, BOOL val);
00173 extern ST * cwh_auxst_find_item(LIST *l, char * name);
00174
00175
00176
00177
00178
00179 extern void cwh_auxst_alloc_proc_entry(ST *st,INT32 num_dum_args, TY_IDX ret_type);
00180 extern void cwh_auxst_patch_proc(TY_IDX rty_idx);
00181 extern BOOL cwh_auxst_find_dummy(ST * arg);
00182 extern INT16 cwh_auxst_num_dummies(ST * entry);
00183 extern ST ** cwh_auxst_arglist(ST * entry);
00184 extern ST * cwh_auxst_find_dummy_len(ST * arg);
00185 extern void cwh_auxst_add_dummy(ST * dummy, BOOL result);
00186 extern void cwh_auxst_set_tylist(ST *en);
00187
00188
00189
00190 extern ST * cwh_auxst_cri_pointee(ST * ptr, ST * pointee);
00191 extern PREG_det cwh_auxst_distr_preg(ST * st);
00192 extern USRCPOS cwh_auxst_srcpos_val(ST * st);
00193 extern USRCPOS * cwh_auxst_srcpos_addr(ST * st) ;
00194 extern WN * cwh_auxst_pragma(ST * ptr, WN * wn = NULL);
00195 extern char * cwh_auxst_stem_name(ST * st, char * name = NULL) ;
00196 INT32 * cwh_auxst_assign_id(SYMTAB_IDX level, LABEL_IDX idx) ;
00197
00198
00199
00200 extern void cwh_auxst_dump (ST * st);
00201 extern void cwh_auxst_dump_list (LIST * l, BOOL verbose);
00202
00203 #endif