keep_alive_barrier operand used wrong block; schedule keep behind phi sequences
[libfirm] / ir / be / bestate.c
index 1967fb5..2a9b067 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2011 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -203,7 +203,7 @@ static void belady(minibelady_env_t *env, ir_node *block);
  * Collects all values live-in at block @p block and all phi results in this
  * block.
  * Then it adds the best values (at most n_regs) to the blocks start_workset.
- * The phis among the remaining values get spilled: Introduce psudo-copies of
+ * The phis among the remaining values get spilled: Introduce pseudo-copies of
  * their args to break interference and make it possible to spill them to the
  * same spill slot.
  */
@@ -260,7 +260,7 @@ static block_info_t *compute_block_start_state(minibelady_env_t *env, ir_node *b
                        continue;
 
                DBG((dbg, LEVEL_2, "\t...checking %+F\n", node));
-               next_use = be_get_next_use(env->uses, first, 0, node, 0);
+               next_use = be_get_next_use(env->uses, first, node, 0);
 
                if (USES_IS_INFINITE(next_use.time)) {
                        DBG((dbg, LEVEL_2, "\tnot taken (dead)\n"));
@@ -310,7 +310,7 @@ static block_info_t *compute_block_start_state(minibelady_env_t *env, ir_node *b
                        continue;
 
                DBG((dbg, LEVEL_2, "\t...checking %+F\n", node));
-               next_use = be_get_next_use(env->uses, first, 0, node, 0);
+               next_use = be_get_next_use(env->uses, first, node, 0);
 
                if (USES_IS_INFINITE(next_use.time)) {
                        DBG((dbg, LEVEL_2, "\tnot taken (dead)\n"));
@@ -473,7 +473,7 @@ static ir_node *get_end_of_block_insertion_point(ir_node *block)
  */
 static void fix_block_borders(ir_node *block, void *data)
 {
-       minibelady_env_t *env = data;
+       minibelady_env_t *env = (minibelady_env_t*)data;
        ir_graph *irg = get_irn_irg(block);
        ir_node *startblock = get_irg_start_block(irg);
        int i;
@@ -557,7 +557,7 @@ void be_assure_state(ir_graph *irg, const arch_register_t *reg, void *func_env,
        info = env.spills;
        while (info != NULL) {
                be_ssa_construction_env_t senv;
-               int i, len;
+               size_t i, len;
                ir_node **phis;
 
                be_ssa_construction_init(&senv, irg);