Fixed initialization of option tables
[libfirm] / ir / be / bespill.c
index 6b2b8ae..93cfb2f 100644 (file)
@@ -116,6 +116,8 @@ int cmp_spillinfo(const void *x, const void *y, size_t size)
 {
        const spill_info_t *xx = x;
        const spill_info_t *yy = y;
+       (void) size;
+
        return xx->to_spill != yy->to_spill;
 }
 
@@ -239,6 +241,8 @@ void be_add_reload(spill_env_t *env, ir_node *to_spill, ir_node *before,
 #endif
        }
 
+       assert(!is_Proj(before) && !be_is_Keep(before));
+
        /* put reload into list */
        rel                = obstack_alloc(&env->obst, sizeof(rel[0]));
        rel->next          = info->reloaders;
@@ -347,7 +351,7 @@ static
 void sched_add_after_insn(ir_node *sched_after, ir_node *node)
 {
        ir_node *next = sched_next(sched_after);
-       while(is_Proj(next) || is_Phi(next)) {
+       while(is_Proj(next) || is_Phi(next) || be_is_Keep(next)) {
                next = sched_next(next);
        }
        assert(next != NULL);
@@ -702,6 +706,7 @@ double be_get_spill_costs(spill_env_t *env, ir_node *to_spill, ir_node *after)
 {
        ir_node *block = get_nodes_block(after);
        double   freq  = get_block_execfreq(env->exec_freq, block);
+       (void) to_spill;
 
        return env->spill_cost * freq;
 }
@@ -890,7 +895,7 @@ void be_insert_spills_reloads(spill_env_t *env)
        be_remove_dead_nodes_from_schedule(env->irg);
        /* Matze: In theory be_ssa_construction should take care of the liveness...
         * try to disable this again in the future */
-       be_invalidate_liveness(env->birg);
+       be_liveness_invalidate(env->birg->lv);
 }
 
 void be_init_spill(void)