Commit f9db3395 authored by Matthias Braun's avatar Matthias Braun
Browse files

be: Slightly reorganize timer code

parent fbf88f1d
......@@ -464,8 +464,9 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
be_lower_for_target();
if (be_timing) {
for (size_t i = 0; i < T_LAST+1; ++i) {
be_timers[i] = ir_timer_new();
for (be_timer_id_t t = T_FIRST; t < T_LAST+1; ++t) {
be_timers[t] = ir_timer_new();
ir_timer_init_parent(be_timers[t]);
}
}
......@@ -518,9 +519,6 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
initialize_birg(&birgs[num_birgs++], prof_init_irg, &env);
}
for (be_timer_id_t t = T_FIRST; t < T_LAST+1; ++t) {
ir_timer_init_parent(be_timers[t]);
}
if (!have_profile) {
be_timer_push(T_EXECFREQ);
foreach_irp_irg(i, irg) {
......@@ -535,15 +533,13 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
if (get_entity_linkage(entity) & IR_LINKAGE_NO_CODEGEN)
continue;
be_timer_push(T_OTHER);
if (stat_ev_enabled) {
stat_ev_ctx_push_fmt("bemain_irg", "%+F", irg);
stat_ev_ull("bemain_insns_start", be_count_insns(irg));
stat_ev_ull("bemain_blocks_start", be_count_blocks(irg));
}
/* stop and reset timers */
be_timer_push(T_OTHER);
/* Verify the initial graph */
if (be_options.do_verify) {
be_timer_push(T_VERIFY);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment