bearch: Add and use be_foreach_value().
[libfirm] / ir / be / bemain.c
index 2015829..74f8294 100644 (file)
@@ -33,7 +33,7 @@
 
 #include "obst.h"
 #include "bitset.h"
-
+#include "statev.h"
 #include "irprog.h"
 #include "irgopt.h"
 #include "irgraph.h"
@@ -480,7 +480,6 @@ static void initialize_birg(be_irg_t *birg, ir_graph *irg, be_main_env_t *env)
        /* Ensure, that the ir_edges are computed. */
        assure_edges(irg);
 
-       add_irg_constraints(irg, IR_GRAPH_CONSTRAINT_BACKEND);
        be_info_init_irg(irg);
 
        dump(DUMP_INITIAL, irg, "prepared");
@@ -495,7 +494,6 @@ static const char *get_timer_name(be_timer_id_t id)
        case T_CODEGEN:        return "codegen";
        case T_RA_PREPARATION: return "ra_preparation";
        case T_SCHED:          return "sched";
-       case T_SPLIT:          return "split";
        case T_CONSTR:         return "constr";
        case T_FINISH:         return "finish";
        case T_EMIT:           return "emit";
@@ -505,7 +503,6 @@ static const char *get_timer_name(be_timer_id_t id)
        case T_LIVE:           return "live";
        case T_EXECFREQ:       return "execfreq";
        case T_SSA_CONSTR:     return "ssa_constr";
-       case T_RA_PROLOG:      return "ra_prolog";
        case T_RA_EPILOG:      return "ra_epilog";
        case T_RA_CONSTR:      return "ra_constr";
        case T_RA_SPILL:       return "ra_spill";
@@ -658,7 +655,8 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
                be_timer_pop(T_VERIFY);
 
                /* get a code generator for this graph. */
-               arch_env->impl->init_graph(irg);
+               if (arch_env->impl->init_graph)
+                       arch_env->impl->init_graph(irg);
 
                /* some transformations need to be done before abi introduce */
                if (arch_env->impl->before_abi != NULL)
@@ -790,12 +788,6 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
 
                dump(DUMP_FINAL, irg, "end");
 
-               if (!arch_env->custom_abi) {
-                       be_timer_push(T_ABI);
-                       be_abi_free(irg);
-                       be_timer_pop(T_ABI);
-               }
-
                restore_optimization_state(&state);
 
                be_timer_pop(T_OTHER);