+ current_ir_graph = irg;
+
+#ifdef FIRM_STATISTICS
+ if(be_stat_ev_is_active()) {
+ ir_snprintf(irg_name, sizeof(irg_name), "%F", irg);
+ be_stat_tags[STAT_TAG_CLS] = "<all>";
+ be_stat_tags[STAT_TAG_IRG] = irg_name;
+ be_stat_ev_push(be_stat_tags, STAT_TAG_LAST, be_stat_file);
+ }
+#endif
+
+ /* stop and reset timers */
+ BE_TIMER_ONLY(
+ LC_STOP_AND_RESET_TIMER(t_abi);
+ LC_STOP_AND_RESET_TIMER(t_codegen);
+ LC_STOP_AND_RESET_TIMER(t_sched);
+ LC_STOP_AND_RESET_TIMER(t_constr);
+ LC_STOP_AND_RESET_TIMER(t_regalloc);
+ LC_STOP_AND_RESET_TIMER(t_finish);
+ LC_STOP_AND_RESET_TIMER(t_emit);
+ LC_STOP_AND_RESET_TIMER(t_verify);
+ LC_STOP_AND_RESET_TIMER(t_other);
+ );
+ BE_TIMER_PUSH(t_other); /* t_other */
+
+ /* Verify the initial graph */
+ BE_TIMER_PUSH(t_verify);
+ if (be_options.vrfy_option == BE_VRFY_WARN) {
+ irg_verify(irg, VRFY_ENFORCE_SSA);
+ be_check_dominance(irg);
+ } else if (be_options.vrfy_option == BE_VRFY_ASSERT) {
+ assert(irg_verify(irg, VRFY_ENFORCE_SSA) && "irg verification failed");
+ assert(be_check_dominance(irg) && "Dominance verification failed");
+ }
+ BE_TIMER_POP(t_verify);
+
+ /**
+ * Create execution frequencies from profile data or estimate some
+ */
+ if (be_profile_has_data()) {
+ birg->exec_freq = be_create_execfreqs_from_profile(irg);
+ } else {
+ birg->exec_freq = compute_execfreq(irg, 10);
+ }
+
+ BE_TIMER_ONLY(num_nodes_b = get_num_reachable_nodes(irg));