gvn_pre: Remove redundant start block test.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 5 Dec 2012 13:27:25 +0000 (14:27 +0100)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 5 Dec 2012 14:06:23 +0000 (15:06 +0100)
The next if tests for less than 2 predecessors, which the start block fulfills.

ir/opt/gvn_pre.c

index 8e87313..21cb6b9 100644 (file)
@@ -1575,7 +1575,8 @@ static void update_new_set_walker(ir_node *block, void *ctx)
  */
 static void hoist_high(ir_node *block, void *ctx)
 {
-       pre_env                *env        = (pre_env*)ctx;
+       (void)ctx;
+
        block_info             *curr_info;
        ir_valueset_iterator_t  iter;
        ir_node                *expr;
@@ -1591,9 +1592,6 @@ static void hoist_high(ir_node *block, void *ctx)
                ir_valueset_del(curr_info->new_set);
        curr_info->new_set = ir_valueset_new(16);
 
-       if (block == env->start_block)
-               return;
-
        if (arity < 2)
                return;
 
@@ -1925,7 +1923,7 @@ static void gvn_pre(ir_graph *irg, pre_env *env)
 #if HOIST_HIGH
        /* An attempt to reduce lifetimes by hoisting already hoisted values
           even higher if their operands die. */
-       dom_tree_walk_irg(irg, hoist_high, NULL, env);
+       dom_tree_walk_irg(irg, hoist_high, NULL, NULL);
        /* update avail_out for elimination */
        dom_tree_walk_irg(irg, update_new_set_walker, NULL, env);
 #endif