Fix fehler171
[libfirm] / ir / be / bespillbelady.c
index 5815e6e..dc0f872 100644 (file)
@@ -46,7 +46,7 @@
 #include "besched.h"
 #include "beirgmod.h"
 #include "belive_t.h"
-#include "benode_t.h"
+#include "benode.h"
 #include "bechordal_t.h"
 #include "bespill.h"
 #include "beloopana.h"
@@ -96,9 +96,9 @@ static unsigned                     instr_nr; /**< current instruction number
 static spill_env_t                 *senv;   /**< see bespill.h */
 static ir_node                    **blocklist;
 
-static bool                         move_spills      = true;
-static bool                         respectloopdepth = true;
-static bool                         improve_known_preds = true;
+static int                          move_spills      = true;
+static int                          respectloopdepth = true;
+static int                          improve_known_preds = true;
 /* factor to weight the different costs of reloading/rematerializing a node
    (see bespill.h be_get_reload_costs_no_weight) */
 static int                          remat_bonus      = 10;
@@ -944,12 +944,6 @@ static void fix_block_borders(ir_node *block, void *data)
        }
 }
 
-static void add_block(ir_node *block, void *data)
-{
-       (void) data;
-       ARR_APP1(ir_node*, blocklist, block);
-}
-
 static void be_spill_belady(be_irg_t *birg, const arch_register_class_t *rcls)
 {
        int i;
@@ -980,8 +974,7 @@ static void be_spill_belady(be_irg_t *birg, const arch_register_class_t *rcls)
        uses      = be_begin_uses(irg, lv);
        loop_ana  = be_new_loop_pressure(birg, cls);
        senv      = be_new_spill_env(birg);
-       blocklist = NEW_ARR_F(ir_node*, 0);
-       irg_block_edges_walk(get_irg_start_block(irg), NULL, add_block, NULL);
+       blocklist = be_get_cfgpostorder(irg);
        stat_ev_tim_pop("belady_time_init");
 
        stat_ev_tim_push();