Go to the documentation of this file.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 #ifndef wn_lower_INCLUDED
00039 #define wn_lower_INCLUDED
00040
00041 #include "opt_alias_interface.h"
00042
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif
00046
00047
00048
00049
00050 typedef INT64 LOWER_ACTIONS;
00051
00052 #define LOWER_NULL 0x000000000000ll
00053 #define LOWER_DO_LOOP 0x000000000001ll
00054 #define LOWER_DO_WHILE 0x000000000002ll
00055 #define LOWER_WHILE_DO 0x000000000004ll
00056 #define LOWER_IF 0x000000000008ll
00057 #define LOWER_COMPLEX 0x000000000010ll
00058 #define LOWER_ARRAY 0x000000000020ll
00059 #define LOWER_SPLIT_CONST_OFFSETS 0x000000000040ll
00060 #define LOWER_ENTRY_EXIT 0x000000000080ll
00061 #define LOWER_CALL 0x000000000100ll
00062 #define LOWER_SPLIT_SYM_ADDRS 0x000000000200ll
00063 #define LOWER_IO_STATEMENT 0x000000000400ll
00064 #define LOWER_MSTORE 0x000000000800ll
00065 #define LOWER_CVT 0x000000001000ll
00066 #define LOWER_MP 0x000000002000ll
00067 #define LOWER_8X_ARRAY 0x000000004000ll
00068 #define LOWER_REGION 0x000000008000ll
00069 #define LOWER_QUAD 0x000000010000ll
00070 #define LOWER_COMPGOTO 0x000000020000ll
00071 #define LOWER_MADD 0x000000040000ll
00072 #define LOWER_INTRINSIC 0x000000080000ll
00073 #define LOWER_INLINE_INTRINSIC 0x000000100000ll
00074 #define LOWER_TOP_LEVEL_ONLY 0x000000200000ll
00075 #define LOWER_REGION_EXITS 0x000000400000ll
00076 #define LOWER_INL_STACK_INTRINSIC 0x000000800000ll
00077 #define LOWER_PREFETCH_MAPS 0x000001000000ll
00078 #define LOWER_ALIAS_MAPS 0x000002000000ll
00079 #define LOWER_DEPGRAPH_MAPS 0x000004000000ll
00080 #define LOWER_PARITY_MAPS 0x000008000000ll
00081 #define LOWER_PICCALL 0x000010000000ll
00082 #define LOWER_BASE_INDEX 0x000020000000ll
00083 #define LOWER_ASSERT 0x000040000000ll
00084 #define LOWER_FREQUENCY_MAPS 0x000080000000ll
00085 #define LOWER_FORMAL_REF 0x000100000000ll
00086 #define LOWER_UPLEVEL 0x000200000000ll
00087 #define LOWER_ENTRY_FORMAL_REF 0x000400000000ll
00088 #define LOWER_SHORTCIRCUIT 0x000800000000ll
00089 #define LOWER_TREEHEIGHT 0x001000000000ll
00090 #define LOWER_RETURN_VAL 0x002000000000ll
00091 #define LOWER_MLDID_MSTID 0x004000000000ll
00092 #define LOWER_BIT_FIELD_ID 0x008000000000ll
00093 #define LOWER_BITS_OP 0x010000000000ll
00094 #define LOWER_UPC_TO_INTR 0x020000000000ll
00095 #define LOWER_UPC_INTRINSIC 0x040000000000ll
00096 #define LOWER_UPC_CONSISTENCY 0x080000000000ll
00097 #define LOWER_UPC_FORALL 0x100000000000ll
00098 #define LOWER_UPC_MFIELD 0x200000000000ll
00099
00100
00101 #define LOWER_TO_CG 0x800000000000ll
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120 #define LOWER_SCF (LOWER_DO_LOOP | LOWER_DO_WHILE | LOWER_WHILE_DO | LOWER_IF)
00121
00122 #define LOWER_ALL_MAPS (LOWER_PREFETCH_MAPS | LOWER_ALIAS_MAPS | LOWER_DEPGRAPH_MAPS | LOWER_PARITY_MAPS | LOWER_FREQUENCY_MAPS)
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132 typedef enum
00133 {
00134 PARITY_UNKNOWN= ~0x0,
00135 PARITY_COMPLEX_REAL= 0x01,
00136 PARITY_COMPLEX_IMAG= 0x02,
00137 PARITY_QUAD_HI= 0x04,
00138 PARITY_QUAD_LO= 0x08
00139 } PARITY;
00140
00141
00142
00143 extern PARITY WN_parity(WN *tree);
00144
00145
00146 extern BOOL WN_parity_independent(WN *wn1, WN *wn2);
00147
00148
00149
00150
00151 extern void Lower_Init(void);
00152 extern void Lowering_Finalize(void);
00153
00154 extern FLD_HANDLE FLD_And_Offset_From_Field_Id (TY_IDX struct_ty_idx,
00155 UINT field_id,
00156 UINT& cur_field_id,
00157 UINT64& offset);
00158
00159 extern WN *WN_Lower(WN *tree, LOWER_ACTIONS actions, struct ALIAS_MANAGER *alias, char *msg);
00160
00161
00162
00163
00164 extern WN *lower_scf_non_recursive(WN *block, WN *tree, LOWER_ACTIONS actions);
00165
00166
00167
00168
00169 extern WN *lower_block(WN *tree, LOWER_ACTIONS actions);
00170
00171
00172
00173
00174 extern const char *LOWER_ACTIONS_name(LOWER_ACTIONS action);
00175
00176 #ifdef __cplusplus
00177 }
00178 #endif
00179
00180
00181
00182
00183 extern UINT32 compute_offset_alignment(INT32 offset, UINT32 align);
00184
00185
00186
00187
00188 extern TY *compute_alignment_type(WN *tree, TY *type, INT64 offset);
00189
00190
00191
00192
00193 extern void WN_Lower_Checkdump(char *msg, WN *tree, LOWER_ACTIONS actions);
00194
00195
00196
00197
00198 extern void U64_lower_wn(WN *, BOOL);
00199
00200 #endif