More missing config.h
[libfirm] / ir / be / becopyheur3.c
index 05e3472..9ee2a9c 100644 (file)
@@ -45,8 +45,8 @@
 #define DUMP_AFTER  2
 #define DUMP_ALL    2 * DUMP_AFTER - 1
 
-static int dump_flags = 0;
-static int dbg_level  = 0;
+static unsigned dump_flags = 0;
+static int      dbg_level  = 0;
 
 #ifdef WITH_LIBCORE
 static const lc_opt_enum_mask_items_t dump_items[] = {
@@ -61,7 +61,7 @@ static lc_opt_enum_mask_var_t dump_var = {
 };
 
 static const lc_opt_table_entry_t options[] = {
-       LC_OPT_ENT_ENUM_MASK("dump", "dump ifg before, after or after each cloud",  &dump_var),
+       LC_OPT_ENT_ENUM_MASK("dump", "dump ifg cloud",                              &dump_var),
        LC_OPT_ENT_INT      ("dbg",  "debug level for the Java coalescer",          &dbg_level),
        { NULL }
 };
@@ -80,7 +80,7 @@ static void set_admissible_regs(be_java_coal_t *coal, copy_opt_t *co, ir_node *i
        arch_register_req_t req;
        unsigned n_regs = co->cls->n_regs;
 
-       ir_printf("%+F\n", irn);
+       // ir_printf("%+F\n", irn);
        arch_get_register_req(co->aenv, &req, irn, BE_OUT_POS(0));
        if(arch_register_req_is(&req, limited)) {
                bitset_t *adm = bitset_alloca(n_regs);
@@ -198,7 +198,10 @@ int co_solve_heuristic_java(copy_opt_t *co)
                if(bitset_is_set(nodes, idx)) {
                        unsigned t_idx             = node_map[idx];
                        unsigned col               = inv_col_map[be_java_coal_get_color(coal, t_idx)];
-                       const arch_register_t *reg = &co->cls->regs[col];
+                       const arch_register_t *reg;
+
+                       assert(col < n_regs);
+                       reg     = &co->cls->regs[col];
                        arch_set_irn_register(co->aenv, n, reg);
                }
        }