remove loopinfo stuff and exclusively use IR_GRAPH_STATE_CONSISTENT_LOOPINFO
[libfirm] / ir / be / bemain.c
index b113fd4..f85257a 100644 (file)
@@ -87,7 +87,7 @@ static be_options_t be_options = {
        0,                                 /* create PIC code */
        BE_VERIFY_WARN,                    /* verification level: warn */
        "",                                /* ilp server */
-       "cplex",                           /* ilp solver */
+       "",                                /* ilp solver */
        0,                                 /* enable statistic event dumping */
        "",                                /* print stat events */
 };
@@ -413,6 +413,10 @@ static void initialize_birg(be_irg_t *birg, ir_graph *irg, be_main_env_t *env)
        /* set the current graph (this is important for several firm functions) */
        current_ir_graph = irg;
 
+       /* For code generation all unreachable code and Bad nodes should be gone */
+       remove_unreachable_blocks(irg);
+       remove_bads(irg);
+
        /* we do this before critical edge split. As this produces less returns,
           because sometimes (= 164.gzip) multiple returns are slower */
        normalize_n_returns(irg);
@@ -718,21 +722,6 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
 
                dump(DUMP_RA, irg, "ra");
 
-               /* let the code generator prepare the graph for emitter */
-               be_timer_push(T_FINISH);
-               if (arch_env->impl->after_ra != NULL)
-                       arch_env->impl->after_ra(irg);
-               be_timer_pop(T_FINISH);
-
-               /* fix stack offsets */
-               be_timer_push(T_ABI);
-               be_abi_fix_stack_nodes(irg);
-               be_remove_dead_nodes_from_schedule(irg);
-               be_abi_fix_stack_bias(irg);
-               be_timer_pop(T_ABI);
-
-               dump(DUMP_SCHED, irg, "fix_stack_after_ra");
-
                be_timer_push(T_FINISH);
                if (arch_env->impl->finish != NULL)
                        arch_env->impl->finish(irg);