libFirm 1.20
|
00001 /* 00002 * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. 00003 * 00004 * This file is part of libFirm. 00005 * 00006 * This file may be distributed and/or modified under the terms of the 00007 * GNU General Public License version 2 as published by the Free Software 00008 * Foundation and appearing in the file LICENSE.GPL included in the 00009 * packaging of this file. 00010 * 00011 * Licensees holding valid libFirm Professional Edition licenses may use 00012 * this file in accordance with the libFirm Commercial License. 00013 * Agreement provided with the Software. 00014 * 00015 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00016 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00017 * PURPOSE. 00018 */ 00019 00025 #ifndef FIRM_STAT_FIRMSTAT_H 00026 #define FIRM_STAT_FIRMSTAT_H 00027 00028 #include "irhooks.h" 00029 #include "begin.h" 00030 00034 enum firmstat_options_t { 00035 FIRMSTAT_ENABLED = 0x00000001, 00036 FIRMSTAT_PATTERN_ENABLED = 0x00000002, 00037 FIRMSTAT_COUNT_STRONG_OP = 0x00000004, 00038 FIRMSTAT_COUNT_DAG = 0x00000008, 00039 FIRMSTAT_COUNT_DELETED = 0x00000010, 00040 FIRMSTAT_COUNT_SELS = 0x00000020, 00041 FIRMSTAT_COUNT_CONSTS = 0x00000040, 00042 FIRMSTAT_COUNT_EXTBB = 0x00000080, 00043 FIRMSTAT_CSV_OUTPUT = 0x10000000 00044 }; 00045 00049 enum firmstat_optimizations_t { 00050 FS_OPT_NEUTRAL_0 = HOOK_OPT_LAST, 00051 FS_OPT_NEUTRAL_1, 00052 FS_OPT_ADD_A_A, 00053 FS_OPT_ADD_A_MINUS_B, 00054 FS_OPT_ADD_SUB, 00055 FS_OPT_ADD_MUL_A_X_A, 00056 FS_OPT_SUB_0_A, 00057 FS_OPT_MINUS_SUB, 00058 FS_OPT_SUB_MINUS, 00059 FS_OPT_SUB_MUL_A_X_A, 00060 FS_OPT_SUB_SUB_X_Y_Z, 00061 FS_OPT_SUB_C_NOT_X, 00062 FS_OPT_SUB_TO_ADD, 00063 FS_OPT_SUB_TO_NOT, 00064 FS_OPT_SUB_TO_CONV, 00065 FS_OPT_MUL_MINUS, 00066 FS_OPT_MUL_MINUS_1, 00067 FS_OPT_MINUS_MUL_C, 00068 FS_OPT_MUL_MINUS_MINUS, 00069 FS_OPT_OR, 00070 FS_OPT_AND, 00071 FS_OPT_TO_EOR, 00072 FS_OPT_EOR_A_A, 00073 FS_OPT_EOR_A_B_A, 00074 FS_OPT_EOR_TO_NOT_BOOL, 00075 FS_OPT_EOR_TO_NOT, 00076 FS_OPT_NOT_CMP, 00077 FS_OPT_OR_SHFT_TO_ROTL, 00078 FS_OPT_REASSOC_SHIFT, 00079 FS_OPT_SHIFT_AND, 00080 FS_OPT_SHIFT_OR, 00081 FS_OPT_SHIFT_EOR, 00082 FS_OPT_CONV, 00083 FS_OPT_CAST, 00084 FS_OPT_MIN_MAX_EQ, 00085 FS_OPT_MUX_COMBINE, 00086 FS_OPT_MUX_CONV, 00087 FS_OPT_MUX_BOOL, 00088 FS_OPT_MUX_NOT_BOOL, 00089 FS_OPT_MUX_OR_BOOL, 00090 FS_OPT_MUX_ORNOT_BOOL, 00091 FS_OPT_MUX_AND_BOOL, 00092 FS_OPT_MUX_ANDNOT_BOOL, 00093 FS_OPT_MUX_C, 00094 FS_OPT_MUX_EQ, 00095 FS_OPT_MUX_TRANSFORM, 00096 FS_OPT_MUX_TO_MIN, 00097 FS_OPT_MUX_TO_MAX, 00098 FS_OPT_MUX_TO_BITOP, 00099 FS_OPT_IDEM_UNARY, 00100 FS_OPT_MINUS_NOT, 00101 FS_OPT_NOT_MINUS_1, 00102 FS_OPT_NOT_PLUS_1, 00103 FS_OPT_ADD_X_NOT_X, 00104 FS_OPT_FP_INV_MUL, 00105 FS_OPT_CONST_PHI, 00106 FS_OPT_PREDICATE, 00107 FS_OPT_DEMORGAN, 00108 FS_OPT_CMP_OP_OP, 00109 FS_OPT_CMP_OP_C, 00110 FS_OPT_CMP_CONV_CONV, 00111 FS_OPT_CMP_CONV, 00112 FS_OPT_CMP_TO_BOOL, 00113 FS_OPT_CMP_CNST_MAGN, 00114 FS_OPT_CMP_SHF_TO_AND, 00115 FS_OPT_CMP_MOD_TO_AND, 00116 FS_OPT_NOP, 00117 FS_OPT_GVN_FOLLOWER, 00118 FS_OPT_GVN_FULLY, 00119 FS_OPT_GVN_PARTLY, 00120 FS_OPT_COMBO_CONST, 00121 FS_OPT_COMBO_CF, 00122 FS_OPT_COMBO_FOLLOWER, 00123 FS_OPT_COMBO_CONGRUENT, 00124 FS_OPT_JUMPTHREADING, 00125 FS_OPT_RTS_ABS, 00126 FS_OPT_RTS_ALLOCA, 00127 FS_OPT_RTS_SQRT, 00128 FS_OPT_RTS_CBRT, 00129 FS_OPT_RTS_POW, 00130 FS_OPT_RTS_EXP, 00131 FS_OPT_RTS_LOG, 00132 FS_OPT_RTS_SIN, 00133 FS_OPT_RTS_COS, 00134 FS_OPT_RTS_TAN, 00135 FS_OPT_RTS_ASIN, 00136 FS_OPT_RTS_ACOS, 00137 FS_OPT_RTS_ATAN, 00138 FS_OPT_RTS_SINH, 00139 FS_OPT_RTS_COSH, 00140 FS_OPT_RTS_TANH, 00141 FS_OPT_RTS_SYMMETRIC, 00142 FS_OPT_RTS_STRCMP, 00143 FS_OPT_RTS_STRNCMP, 00144 FS_OPT_RTS_STRCPY, 00145 FS_OPT_RTS_STRLEN, 00146 FS_OPT_RTS_MEMCPY, 00147 FS_OPT_RTS_MEMPCPY, 00148 FS_OPT_RTS_MEMMOVE, 00149 FS_OPT_RTS_MEMSET, 00150 FS_OPT_RTS_MEMCMP, 00151 FS_BE_IA32_LEA, 00152 FS_BE_IA32_LOAD_LEA, 00153 FS_BE_IA32_STORE_LEA, 00154 FS_BE_IA32_AM_S, 00155 FS_BE_IA32_AM_D, 00156 FS_BE_IA32_CJMP, 00157 FS_BE_IA32_2ADDRCPY, 00158 FS_BE_IA32_SPILL2ST, 00159 FS_BE_IA32_RELOAD2LD, 00160 FS_BE_IA32_SUB2NEGADD, 00161 FS_BE_IA32_LEA2ADD, 00162 FS_OPT_MAX 00163 }; 00164 00172 FIRM_API void stat_dump_snapshot(const char *fname, const char *phase); 00173 00183 FIRM_API ir_prog_pass_t *stat_dump_snapshot_pass( 00184 const char *name, const char *fname, const char *phase); 00185 00192 FIRM_API void firm_init_stat(unsigned enable_options); 00193 00197 FIRM_API void stat_term(void); 00198 00202 FIRM_API int stat_is_active(void); 00203 00204 #include "end.h" 00205 00206 #endif