fix various warnings reported by cparser
[libfirm] / ir / be / bespill.c
index 2d3436a..1e18a65 100644 (file)
@@ -29,7 +29,7 @@
 #include "irtools.h"
 #include "debug.h"
 #include "iredges_t.h"
-#include "adt/raw_bitset.h"
+#include "raw_bitset.h"
 #include "statev.h"
 #include "irgwalk.h"
 
@@ -39,7 +39,7 @@
 #include "belive_t.h"
 #include "beirg.h"
 #include "bearch.h"
-#include "benode_t.h"
+#include "benode.h"
 #include "besched.h"
 #include "bera.h"
 #include "beintlive_t.h"
@@ -136,15 +136,9 @@ static void prepare_constr_insn(be_pre_spill_env_t *env, ir_node *node)
 
                        /* if the constraint is the same, no copy is necessary
                         * TODO generalise unequal but overlapping constraints */
-                       if (rbitset_equal(req->limited, req2->limited, cls->n_regs))
+                       if (rbitsets_equal(req->limited, req2->limited, cls->n_regs))
                                continue;
 
-#if 0
-                       /* Matze: looks fishy to me disabled it for now */
-                       if (be_is_Copy(get_irn_n(insn->irn, a_op->pos)))
-                               continue;
-#endif
-
                        copy = be_new_Copy(cls, block, in);
                        stat_ev_int("constr_copy", 1);
 
@@ -253,6 +247,9 @@ void be_pre_spill_prepare_constr(be_irg_t *birg,
        memset(&env, 0, sizeof(env));
        env.birg = birg;
        env.cls  = cls;
+
+       be_assure_liveness(birg);
+
        irg_block_walk_graph(irg, pre_spill_prepare_constr_walker, NULL, &env);
 }
 
@@ -280,11 +277,11 @@ void be_register_spiller(const char *name, be_spiller_t *spiller)
 void be_do_spill(be_irg_t *birg, const arch_register_class_t *cls)
 {
        assert(selected_spiller != NULL);
-       if (selected_spiller != NULL) {
-               selected_spiller->spill(birg, cls);
-       }
+
+       selected_spiller->spill(birg, cls);
 }
 
+BE_REGISTER_MODULE_CONSTRUCTOR(be_init_spilloptions);
 void be_init_spilloptions(void)
 {
        lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
@@ -296,5 +293,3 @@ void be_init_spilloptions(void)
 
        FIRM_DBG_REGISTER(dbg, "firm.be.spillprepare");
 }
-
-BE_REGISTER_MODULE_CONSTRUCTOR(be_init_spilloptions);