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
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 #ifndef opt_defs_INCLUDED
00066 #define opt_defs_INCLUDED "opt_defs.h"
00067 #ifdef _KEEP_RCS_ID
00068 static char *opt_defsrcs_id = opt_defs_INCLUDED"$Revision$";
00069 #endif
00070
00071 #ifndef defs_INCLUDED
00072 #include "defs.h"
00073 #endif
00074 #ifndef mtypes_INCLUDED
00075 #include "mtypes.h"
00076 #endif
00077 #ifndef tracing_INCLUDED
00078 #include "tracing.h"
00079 #endif
00080 #ifndef symtab_INCLUDED
00081 #include "symtab.h"
00082 #endif
00083
00084 #ifdef __cplusplus
00085 extern "C" {
00086 #endif
00087
00088 typedef TYPE_ID MTYPE;
00089
00090 #define MTYPE_IS_INTEGER(ty) (MTYPE_type_class(ty) & MTYPE_CLASS_INTEGER)
00091
00092
00093 #ifndef TRUE
00094 #define TRUE 1
00095 #define FALSE 0
00096 #endif
00097
00098 #ifndef BOOL
00099 #define BOOL INT
00100 #endif
00101
00102 #ifndef ILLEGAL_BP
00103 #define ILLEGAL_BP (-1)
00104 #endif
00105
00106 typedef mINT16 IDX_16;
00107 typedef mINT32 IDX_32;
00108 typedef mINT64 IDX_64;
00109
00110 typedef IDTYPE AUX_ID;
00111 typedef IDTYPE VER_ID;
00112 typedef IDTYPE EXP_ID;
00113
00114 enum STMT_ID {
00115 INVALID_STMT_ID = -1
00116 };
00117
00118 #ifdef Is_True_On
00119 #define Is_Trace(Cond, Parmlist) { if (Cond) fprintf Parmlist ; }
00120 #define Is_Trace_cmd(Cond, Cmd) { if (Cond) Cmd ; }
00121 #else
00122 #define Is_Trace(Cond, Parmlist) ((void) 1)
00123 #define Is_Trace_cmd(Cond, Cmd) ((void) 1)
00124 #endif
00125
00126 #ifdef __cplusplus
00127
00128
00129 #ifndef OPTS_ACTION_DEF
00130 #define OPTS_ACTION_DEF
00131 enum OPTS_ACTION {
00132 OPTS_FALSE,
00133 OPTS_TRUE,
00134 OPTS_DONT_CARE
00135 };
00136 #endif
00137
00138 static inline BOOL
00139 Is_fortran(void)
00140 {
00141 Is_True((PU_src_lang(Get_Current_PU()) &
00142 (PU_src_lang(Get_Current_PU()) - 1)) == 0,
00143 ("Mixed-language inlining not allowed; "
00144 "need to know original PU language"));
00145 return (PU_src_lang(Get_Current_PU()) == PU_F77_LANG ||
00146 PU_src_lang(Get_Current_PU()) == PU_F90_LANG);
00147 }
00148 #define IS_FORTRAN Is_fortran()
00149
00150 #endif
00151
00152
00153
00154
00155
00156
00157 #define DOM_DUMP_FLAG 0x0001
00158 #define SSA_DUMP_FLAG 0x0002
00159 #define CFG_VERF_FLAG 0x0004
00160 #define CFG_DUMP_FLAG 0x0008
00161 #define DSE_DUMP_FLAG 0x0010
00162 #define PROP_DUMP_FLAG 0x0020
00163 #define FOLD_DUMP_FLAG 0x0040
00164 #define DCE_DUMP_FLAG 0x0080
00165 #define IVR_DUMP_FLAG 0x0100
00166 #define DU_DUMP_FLAG 0x0200
00167 #define EMIT_DUMP_FLAG 0x0400
00168 #define ALIAS_DUMP_FLAG 0x0800
00169 #define ITAB_DUMP_FLAG 0x1000
00170 #define DFEQN_DUMP_FLAG 0x2000
00171 #define CR_DUMP_FLAG 0x4000
00172 #define DFLOC_DUMP_FLAG 0x8000
00173 #define RVI_TRACE_FLAG 0x10000
00174 #define MAIN_EMIT_DUMP_FLAG 0x20000
00175 #define INDUCTION_DUMP_FLAG 0x40000
00176 #define OPT_LOWER_FLAG 0x80000
00177 #define LFTR_FLAG 0x100000
00178 #define IVE_TRACE_FLAG 0x200000
00179 #define LPRE_DUMP_FLAG 0x400000
00180 #define LDX_DUMP_FLAG 0x800000
00181 #define ALIAS_TRACE_FLAG 0x1000000
00182 #define EXC_TRACE_FLAG 0x2000000
00183 #define TAIL_TRACE_FLAG 0x4000000
00184 #define EPRE_DUMP_FLAG 0x8000000
00185 #define SPRE_DUMP_FLAG 0x10000000
00186 #define MEM_DUMP_FLAG 0x20000000
00187 #define STATISTICS_FLAG 0x40000000
00188 #define ENABLE_STAT 0x80000000
00189
00190 #define SECOND_RENAME_FLAG 0x2
00191 #define BOOL_SIMP_FLAG 0x4
00192 #define FB_PRE_FLAG 0x8
00193 #define CFG_OPT_FLAG 0x10
00194 #define WOVP_DUMP_FLAG 0x20
00195 #define PT_SUMMARY_FLAG 0x40
00196 #define LOOP_MULTVER_FLAG 0x80
00197 #define LOOP_NORM_FLAG 0x00000100
00198 #define LCLSC_TRACE_FLAG 0x00000200
00199
00200
00201
00202
00203
00204 enum VALUE_NUMBERING_FLAG
00205 {VNFRE_OFF = 0,
00206 VNFRE_AFTER_EPRE = 1,
00207 VNFRE_BEFORE_AND_AFTER_EPRE = 2,
00208 VNFRE_SINGLE_PASS_AFTER_EPRE = 3,
00209 VNFRE_SINGLE_PASS_BEFORE_AND_AFTER_EPRE = 4,
00210 VNFRE_NO_OF_FLAGS = 5
00211 };
00212
00213
00214
00215 #ifdef Is_True_On
00216 #define OPT_POOL_Initialize(pool, str, bool, debug) \
00217 { if (Get_Trace(TP_GLOBOPT, MEM_DUMP_FLAG)) \
00218 fprintf(TFile,"0x%x, 0x%p, OPT_POOL_Initialize(%s)\n",debug,pool,str); \
00219 MEM_POOL_Initialize(pool, str, bool); \
00220 }
00221 #define OPT_POOL_Alloc(pool, size, debug) \
00222 ((Get_Trace(TP_GLOBOPT, MEM_DUMP_FLAG)) ? \
00223 (fprintf(TFile,"0x%x, 0x%p, OPT_POOL_Alloc()\n",debug,pool), \
00224 MEM_POOL_Alloc(pool, size)) : MEM_POOL_Alloc(pool, size))
00225 #define OPT_POOL_Realloc(pool, p1, p2, p3, debug) \
00226 ((Get_Trace(TP_GLOBOPT, MEM_DUMP_FLAG)) ? \
00227 (fprintf(TFile,"0x%x, 0x%p, OPT_POOL_Realloc()\n",debug,pool), \
00228 MEM_POOL_Realloc(pool, p1, p2, p3)) : MEM_POOL_Realloc(pool, p1, p2, p3))
00229 #define TYPE_OPT_POOL_ALLOC(obj, pool, debug) \
00230 ((Get_Trace(TP_GLOBOPT, MEM_DUMP_FLAG)) ? \
00231 (fprintf(TFile,"0x%x, 0x%p, TYPE_OPT_POOL_ALLOC()\n",debug,pool), \
00232 TYPE_MEM_POOL_ALLOC(obj, pool)) : TYPE_MEM_POOL_ALLOC(obj, pool))
00233 #define TYPE_OPT_POOL_ALLOC_N(n, pool, num, debug) \
00234 ((Get_Trace(TP_GLOBOPT, MEM_DUMP_FLAG)) ? \
00235 (fprintf(TFile,"0x%x, 0x%p, TYPE_OPT_POOL_ALLOC_N()\n",debug,pool), \
00236 TYPE_MEM_POOL_ALLOC_N(n, pool, num)) : TYPE_MEM_POOL_ALLOC_N(n, pool, num))
00237 #define OPT_POOL_Delete(pool, debug) \
00238 { if (Get_Trace(TP_GLOBOPT, MEM_DUMP_FLAG)) \
00239 fprintf(TFile,"0x%x, 0x%p, OPT_POOL_Delete()\n",debug,pool); \
00240 MEM_POOL_Delete(pool); \
00241 }
00242 #define OPT_POOL_FREE(pool, item, debug) \
00243 { if (Get_Trace(TP_GLOBOPT, MEM_DUMP_FLAG)) \
00244 fprintf(TFile,"0x%x, 0x%p, OPT_POOL_FREE()\n",debug,pool); \
00245 MEM_POOL_FREE(pool, item); \
00246 }
00247 #define OPT_POOL_Push(pool, debug) \
00248 { if (Get_Trace(TP_GLOBOPT, MEM_DUMP_FLAG)) \
00249 fprintf(TFile,"0x%x, 0x%p, OPT_POOL_Push()\n",debug,pool); \
00250 MEM_POOL_Push(pool); \
00251 }
00252 #define OPT_POOL_Pop(pool, debug) \
00253 { if (Get_Trace(TP_GLOBOPT, MEM_DUMP_FLAG)) \
00254 fprintf(TFile,"0x%x, 0x%p, OPT_POOL_Pop()\n",debug,pool); \
00255 MEM_POOL_Pop(pool); \
00256 }
00257 #else
00258 #define OPT_POOL_Initialize(pool, str, bool, debug) \
00259 MEM_POOL_Initialize(pool, str, bool);
00260 #define OPT_POOL_Alloc(pool, size, debug) \
00261 MEM_POOL_Alloc(pool, size);
00262 #define OPT_POOL_Realloc(pool, p1, p2, p3, debug) \
00263 MEM_POOL_Realloc(pool, p1, p2, p3);
00264 #define TYPE_OPT_POOL_ALLOC(obj, pool, debug) \
00265 TYPE_MEM_POOL_ALLOC(obj, pool);
00266 #define TYPE_OPT_POOL_ALLOC_N(n, pool, num, debug) \
00267 TYPE_MEM_POOL_ALLOC_N(n, pool, num);
00268 #define OPT_POOL_Delete(pool, debug) \
00269 MEM_POOL_Delete(pool);
00270 #define OPT_POOL_FREE(pool, item, debug) \
00271 MEM_POOL_FREE(pool, item);
00272 #define OPT_POOL_Push(pool, debug) \
00273 MEM_POOL_Push(pool);
00274 #define OPT_POOL_Pop(pool, debug) \
00275 MEM_POOL_Pop(pool);
00276 #endif
00277
00278
00279 #ifdef __cplusplus
00280 }
00281 #endif
00282
00283 #endif