some minor changes
[libfirm] / ir / be / beraextern.c
index 0ec748c..5b97486 100644 (file)
@@ -88,6 +88,7 @@ alloc         ::= node-nr reg-nr .
 #include "beirgmod.h"
 #include "besched.h"
 #include "beutil.h"
+#include "belive_t.h"
 
 typedef struct _var_info_t var_info_t;
 
@@ -602,7 +603,7 @@ static void dump_affinities_walker(ir_node *irn, void *env) {
 
 
 static void dump_affinities(be_raext_env_t *raenv) {
-       fprintf(raenv->f, "\ninterferences {\n");
+       fprintf(raenv->f, "\naffinities {\n");
        irg_walk_graph(raenv->irg, NULL, dump_affinities_walker, raenv);
        fprintf(raenv->f, "}\n");
 }
@@ -713,8 +714,7 @@ static INLINE void var_add_spills_and_reloads(be_raext_env_t *raenv, int var_nr)
                }
 
        /* correct the reload->spill pointers... */
-       be_ssa_constr_sets(raenv->dom_info, spills, reloads);
-
+       be_ssa_constr_set(raenv->dom_info, spills);
 
        /****** correct the variable <--> values mapping: ******
         *
@@ -745,8 +745,6 @@ static INLINE void var_add_spills_and_reloads(be_raext_env_t *raenv, int var_nr)
        pset_foreach(reloads, irn)
                raenv->cls_vars[raenv->n_cls_vars++] = var_add_value(raenv, get_irn_node_nr(irn), irn);
 
-
-
        del_pset(spills);
        del_pset(reloads);
 }
@@ -819,7 +817,7 @@ static int read_and_apply_results(be_raext_env_t *raenv, char *filename) {
  * Default values for options
  */
 static void (*ssa_destr)(be_raext_env_t*) = ssa_destr_simple;
-static char callee[128] = "echo";
+static char callee[128] = "/ben/kimohoff/ipd-registerallocator/register_allocator";
 
 
 /**
@@ -840,6 +838,7 @@ static void be_ra_extern_main(const be_irg_t *bi) {
        var_info_t *vi;
 
        compute_doms(irg);
+       be_liveness(irg);
 
        raenv.irg      = irg;
        raenv.aenv     = env->arch_env;
@@ -903,14 +902,14 @@ static void be_ra_extern_main(const be_irg_t *bi) {
 #ifdef WITH_LIBCORE
 
 
-static const lc_opt_enum_const_ptr_items_t ssa_destr_items[] = {
-       { "simple",    (void*)ssa_destr_simple }, /* TODO make (void*) casts nicer */
-       { "rastello",  (void*)ssa_destr_rastello },
+static const lc_opt_enum_func_ptr_items_t ssa_destr_items[] = {
+       { "simple",     (int (*)()) ssa_destr_simple }, /* TODO make (void*) casts nicer */
+       { "rastello",   (int (*)()) ssa_destr_rastello },
        { NULL,      NULL }
 };
 
-static lc_opt_enum_const_ptr_var_t ssa_destr_var = {
-       (const void **) &ssa_destr, ssa_destr_items
+static lc_opt_enum_func_ptr_var_t ssa_destr_var = {
+        (int (**)()) &ssa_destr, ssa_destr_items
 };
 
 static const lc_opt_table_entry_t be_ra_extern_options[] = {