Make spiller more deterministic.
[libfirm] / ir / opt / opt_blocks.c
index e552ce6..0f49d71 100644 (file)
@@ -1192,7 +1192,7 @@ static void add_roots(ir_graph *irg, environment_t *env)
 #endif /* GENERAL_SHAPE */
 
 /* Combines congruent end blocks into one. */
-int shape_blocks(ir_graph *irg)
+void shape_blocks(ir_graph *irg)
 {
        environment_t env;
        partition_t   *part;
@@ -1260,8 +1260,7 @@ int shape_blocks(ir_graph *irg)
 
        if (res) {
                /* control flow changed */
-               clear_irg_state(irg, IR_GRAPH_STATE_CONSISTENT_DOMINANCE
-                                  | IR_GRAPH_STATE_VALID_EXTENDED_BLOCKS);
+               clear_irg_properties(irg, IR_GRAPH_PROPERTY_CONSISTENT_DOMINANCE);
        }
 
        for (bl = env.all_blocks; bl != NULL; bl = bl->all_next) {
@@ -1271,11 +1270,9 @@ int shape_blocks(ir_graph *irg)
        DEL_ARR_F(env.live_outs);
        del_set(env.opcode2id_map);
        obstack_free(&env.obst, NULL);
-
-       return res;
 }  /* shape_blocks */
 
 ir_graph_pass_t *shape_blocks_pass(const char *name)
 {
-       return def_graph_pass_ret(name ? name : "shape_blocks", shape_blocks);
+       return def_graph_pass(name ? name : "shape_blocks", shape_blocks);
 }  /* shape_blocks_pass */