Fixed register allocation for fp != sp
[libfirm] / ir / be / becopyheur.c
index 941c05b..2bda705 100644 (file)
@@ -29,7 +29,7 @@
 #include "becopystat.h"
 #include "bitset.h"
 
-static firm_dbg_module_t *dbg = NULL;
+DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
 
 #define SEARCH_FREE_COLORS
 
@@ -580,7 +580,9 @@ static void ou_optimize(unit_t *ou) {
 
 int co_solve_heuristic(copy_opt_t *co) {
        unit_t *curr;
-       dbg = firm_dbg_register("ir.be.copyoptheur");
+       FIRM_DBG_REGISTER(dbg, "ir.be.copyoptheur");
+
+       ASSERT_OU_AVAIL(co);
 
        pinned_global = pset_new_ptr(SLOTS_PINNED_GLOBAL);
        list_for_each_entry(unit_t, curr, &co->units, units)