/**
* update info on Consts
*
+ * @param status statistic status
* @param node The Const node
* @param graph The graph entry containing the call
*/
graph_entry_t *graph = env;
/* check for properties that depends on calls like recursion/leaf/indirect call */
- if (get_irn_op(node) == op_Call)
+ if (is_Call(node))
stat_update_call_2(node, graph);
}
static hook_entry_t stat_hooks[hook_last];
/* initialize the statistics module. */
-void init_stat(unsigned enable_options)
+void firm_init_stat(unsigned enable_options)
{
#define X(a) a, sizeof(a)-1
#define HOOK(h, fkt) \
stat_hooks[h].hook._##h = fkt; register_hook(h, &stat_hooks[h])
+ unsigned num = 0;
if (! (enable_options & FIRMSTAT_ENABLED))
return;
if (enable_options & FIRMSTAT_COUNT_STRONG_OP) {
/* build the pseudo-ops */
- _op_Phi0.code = get_next_ir_opcode();
+
+ _op_Phi0.code = --num;
_op_Phi0.name = new_id_from_chars(X("Phi0"));
- _op_PhiM.code = get_next_ir_opcode();
+ _op_PhiM.code = --num;
_op_PhiM.name = new_id_from_chars(X("PhiM"));
- _op_ProjM.code = get_next_ir_opcode();
+ _op_ProjM.code = --num;
_op_ProjM.name = new_id_from_chars(X("ProjM"));
- _op_MulC.code = get_next_ir_opcode();
+ _op_MulC.code = --num;
_op_MulC.name = new_id_from_chars(X("MulC"));
- _op_DivC.code = get_next_ir_opcode();
+ _op_DivC.code = --num;
_op_DivC.name = new_id_from_chars(X("DivC"));
- _op_ModC.code = get_next_ir_opcode();
+ _op_ModC.code = --num;
_op_ModC.name = new_id_from_chars(X("ModC"));
- _op_DivModC.code = get_next_ir_opcode();
+ _op_DivModC.code = --num;
_op_DivModC.name = new_id_from_chars(X("DivModC"));
status->op_Phi0 = &_op_Phi0;
}
if (enable_options & FIRMSTAT_COUNT_SELS) {
- _op_SelSel.code = get_next_ir_opcode();
+ _op_SelSel.code = --num;
_op_SelSel.name = new_id_from_chars(X("Sel(Sel)"));
- _op_SelSelSel.code = get_next_ir_opcode();
+ _op_SelSelSel.code = --num;
_op_SelSelSel.name = new_id_from_chars(X("Sel(Sel(Sel))"));
status->op_SelSel = &_op_SelSel;
#else
/* initialize the statistics module. */
-void init_stat(unsigned enable_options) {}
+void firm_init_stat(unsigned enable_options) {}
/* Dumps a statistics snapshot */
void stat_dump_snapshot(const char *name, const char *phase) {}
FS_OPT_MUX_TO_MAX, /**< Mux(a > b, a, b) = Max(a,b) */
FS_OPT_MUX_TO_ABS, /**< Mux(a > b, a, b) = Abs(a,b) */
FS_OPT_MUX_TO_SHR, /**< Mux(a > b, a, b) = a >> b */
+ FS_BE_IA32_LEA, /**< Lea was created */
FS_OPT_MAX
};
*
* @param enable_options a bitmask containing the statistic options
*/
-void init_stat(unsigned enable_options);
+void firm_init_stat(unsigned enable_options);
/**
* terminates the statistics module, frees all memory
{ HOOK_OPT_CONST_EVAL, "constant evaluation" },
{ HOOK_OPT_ALGSIM, "algebraic simplification" },
{ HOOK_OPT_PHI, "Phi optmization" },
+ { HOOK_OPT_SYNC, "Sync optmization" },
{ HOOK_OPT_WAW, "Write-After-Write optimization" },
{ HOOK_OPT_WAR, "Write-After-Read optimization" },
{ HOOK_OPT_RAW, "Read-After-Write optimization" },
{ HOOK_OPT_CONFIRM, "Confirm-based optimization: replacement" },
{ HOOK_OPT_CONFIRM_C, "Confirm-based optimization: replaced by const" },
{ HOOK_OPT_CONFIRM_E, "Confirm-based optimization: evaluated" },
+ { HOOK_OPT_EXC_REM, "a exception edge was removed due to a Confirmation prove" },
{ HOOK_LOWERED, "Lowered" },
+ { HOOK_BACKEND, "Backend transformation" },
{ FS_OPT_NEUTRAL_0, "algebraic simplification: a op 0 = 0 op a = a" },
{ FS_OPT_NEUTRAL_1, "algebraic simplification: a op 1 = 1 op a = a" },
{ FS_OPT_ADD_A_A, "algebraic simplification: a + a = a * 2" },
{ FS_OPT_MUX_TO_MAX, "algebraic simplification: Mux(a > b, a, b) = Max(a,b)" },
{ FS_OPT_MUX_TO_ABS, "algebraic simplification: Mux(a > b, a, b) = Abs(a,b)" },
{ FS_OPT_MUX_TO_SHR, "algebraic simplification: Mux(a > b, a, b) = a >> b" },
+ { FS_BE_IA32_LEA, "Backend transformation: Lea was created" },
};
static const char *if_conv_names[IF_RESULT_LAST] = {
b_entry->cnt_edges.cnt[0],
b_entry->cnt_in_edges.cnt[0],
b_entry->cnt_out_edges.cnt[0],
- b_entry->cnt_phi_data.cnt[0],
+ b_entry->cnt_phi_data.cnt[0],
(double)b_entry->cnt_edges.cnt[0] / (double)b_entry->cnt_nodes.cnt[0]
);
}