projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Do not mark the transformed as visited. It makes no sense at all.
[libfirm]
/
ir
/
be
/
bemain.c
diff --git
a/ir/be/bemain.c
b/ir/be/bemain.c
index
0d9269a
..
4cc8d73
100644
(file)
--- a/
ir/be/bemain.c
+++ b/
ir/be/bemain.c
@@
-459,9
+459,6
@@
static void initialize_birg(be_irg_t *birg, ir_graph *irg, be_main_env_t *env)
dump(DUMP_INITIAL, irg, "-begin", dump_ir_block_graph);
dump(DUMP_INITIAL, irg, "-begin", dump_ir_block_graph);
- be_stat_init_irg(env->arch_env, irg);
- be_do_stat_nodes(irg, "01 Begin");
-
/* set the current graph (this is important for several firm functions) */
current_ir_graph = irg;
/* set the current graph (this is important for several firm functions) */
current_ir_graph = irg;
@@
-615,7
+612,11
@@
static void be_main_loop(FILE *file_handle, const char *cup_name)
/* reset the phi handler. */
be_phi_handler_reset();
/* reset the phi handler. */
be_phi_handler_reset();
- stat_ev_ctx_push_fobj("bemain_irg", irg);
+ stat_ev_if {
+ stat_ev_ctx_push_fobj("bemain_irg", irg);
+ be_stat_ev("bemain_insns_start", be_count_insns(irg));
+ be_stat_ev("bemain_blocks_start", be_count_blocks(irg));
+ }
/* stop and reset timers */
BE_TIMER_PUSH(t_other); /* t_other */
/* stop and reset timers */
BE_TIMER_PUSH(t_other); /* t_other */
@@
-646,7
+647,6
@@
static void be_main_loop(FILE *file_handle, const char *cup_name)
BE_TIMER_POP(t_abi);
dump(DUMP_ABI, irg, "-abi", dump_ir_block_graph);
BE_TIMER_POP(t_abi);
dump(DUMP_ABI, irg, "-abi", dump_ir_block_graph);
- be_do_stat_nodes(irg, "02 Abi");
if (be_options.vrfy_option == BE_VRFY_WARN) {
be_check_dominance(irg);
if (be_options.vrfy_option == BE_VRFY_WARN) {
be_check_dominance(irg);
@@
-664,8
+664,6
@@
static void be_main_loop(FILE *file_handle, const char *cup_name)
/* reset the phi handler. */
be_phi_handler_reset();
/* reset the phi handler. */
be_phi_handler_reset();
- be_do_stat_nodes(irg, "03 Prepare");
-
dump(DUMP_PREPARED, irg, "-prepared", dump_ir_block_graph);
if (be_options.vrfy_option == BE_VRFY_WARN) {
dump(DUMP_PREPARED, irg, "-prepared", dump_ir_block_graph);
if (be_options.vrfy_option == BE_VRFY_WARN) {
@@
-722,8
+720,6
@@
static void be_main_loop(FILE *file_handle, const char *cup_name)
be_sched_vrfy(birg, be_options.vrfy_option);
BE_TIMER_POP(t_verify);
be_sched_vrfy(birg, be_options.vrfy_option);
BE_TIMER_POP(t_verify);
- be_do_stat_nodes(irg, "04 Schedule");
-
/* introduce patterns to assure constraints */
BE_TIMER_PUSH(t_constr);
/* we switch off optimizations here, because they might cause trouble */
/* introduce patterns to assure constraints */
BE_TIMER_PUSH(t_constr);
/* we switch off optimizations here, because they might cause trouble */
@@
-738,7
+734,6
@@
static void be_main_loop(FILE *file_handle, const char *cup_name)
BE_TIMER_POP(t_constr);
dump(DUMP_SCHED, irg, "-assured", dump_ir_block_graph_sched);
BE_TIMER_POP(t_constr);
dump(DUMP_SCHED, irg, "-assured", dump_ir_block_graph_sched);
- be_do_stat_nodes(irg, "05 Constraints");
/* stuff needs to be done after scheduling but before register allocation */
BE_TIMER_PUSH(t_codegen);
/* stuff needs to be done after scheduling but before register allocation */
BE_TIMER_PUSH(t_codegen);
@@
-757,15
+752,13
@@
static void be_main_loop(FILE *file_handle, const char *cup_name)
be_sched_vrfy(birg, be_options.vrfy_option);
BE_TIMER_POP(t_verify);
be_sched_vrfy(birg, be_options.vrfy_option);
BE_TIMER_POP(t_verify);
- /* do some statistics */
stat_ev_if {
stat_ev_if {
- be_do_stat_reg_pressure(birg);
+ stat_ev_dbl("bemain_costs_before_ra",
+ be_estimate_irg_costs(irg, arch_env, birg->exec_freq));
+ be_stat_ev("bemain_insns_before_ra", be_count_insns(irg));
+ be_stat_ev("bemain_blocks_before_ra", be_count_blocks(irg));
}
}
-#ifdef FIRM_STATISTICS
- stat_ev_dbl("bemain_costs_before_ra", be_estimate_irg_costs(irg, arch_env, birg->exec_freq));
-#endif
-
/* Do register allocation */
be_allocate_registers(birg);
/* Do register allocation */
be_allocate_registers(birg);
@@
-774,7
+767,6
@@
static void be_main_loop(FILE *file_handle, const char *cup_name)
#endif
dump(DUMP_RA, irg, "-ra", dump_ir_block_graph_sched);
#endif
dump(DUMP_RA, irg, "-ra", dump_ir_block_graph_sched);
- be_do_stat_nodes(irg, "06 Register Allocation");
/* let the code generator prepare the graph for emitter */
BE_TIMER_PUSH(t_finish);
/* let the code generator prepare the graph for emitter */
BE_TIMER_PUSH(t_finish);
@@
-796,6
+788,11
@@
static void be_main_loop(FILE *file_handle, const char *cup_name)
dump(DUMP_FINAL, irg, "-finish", dump_ir_block_graph_sched);
dump(DUMP_FINAL, irg, "-finish", dump_ir_block_graph_sched);
+ stat_ev_if {
+ be_stat_ev("bemain_insns_finish", be_count_insns(irg));
+ be_stat_ev("bemain_blocks_finish", be_count_blocks(irg));
+ }
+
/* check schedule and register allocation */
BE_TIMER_PUSH(t_verify);
if (be_options.vrfy_option == BE_VRFY_WARN) {
/* check schedule and register allocation */
BE_TIMER_PUSH(t_verify);
if (be_options.vrfy_option == BE_VRFY_WARN) {
@@
-826,7
+823,6
@@
static void be_main_loop(FILE *file_handle, const char *cup_name)
be_abi_free(birg->abi);
BE_TIMER_POP(t_abi);
be_abi_free(birg->abi);
BE_TIMER_POP(t_abi);
- be_do_stat_nodes(irg, "07 Final");
restore_optimization_state(&state);
BE_TIMER_POP(t_other);
restore_optimization_state(&state);
BE_TIMER_POP(t_other);
@@
-915,6
+911,7
@@
void be_main(FILE *file_handle, const char *cup_name)
be_options.statev = 1;
stat_ev_begin(buf, be_options.filtev);
be_options.statev = 1;
stat_ev_begin(buf, be_options.filtev);
+ stat_ev_ctx_push_str("bemain_compilation_unit", cup_name);
}
#endif
}
#endif
@@
-936,8
+933,10
@@
void be_main(FILE *file_handle, const char *cup_name)
}
#ifdef FIRM_STATISTICS
}
#ifdef FIRM_STATISTICS
- if (be_options.statev)
+ if (be_options.statev) {
+ stat_ev_ctx_pop("bemain_compilation_unit");
stat_ev_end();
stat_ev_end();
+ }
#endif
}
#endif
}