Adapted some issues noticed during removal of unused variables.
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>
Fri, 27 May 2011 11:31:47 +0000 (13:31 +0200)
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>
Fri, 27 May 2011 11:33:26 +0000 (13:33 +0200)
ir/ana/vrp.c
ir/opt/loop.c
ir/opt/opt_blocks.c
ir/opt/proc_cloning.c

index 4d61c04..d1d0a67 100644 (file)
@@ -178,9 +178,8 @@ static int vrp_update_node(ir_node *node)
 
                /* We can only compute this if the right value is a constant*/
                if (is_Const(right)) {
-                       ir_tarval *bits_set, *bits_not_set;
-                       bits_set = tarval_rotl(vrp_left->bits_set, get_Const_tarval(right));
-                       bits_not_set = tarval_rotl(vrp_left->bits_not_set, get_Const_tarval(right));
+                       new_bits_set = tarval_rotl(vrp_left->bits_set, get_Const_tarval(right));
+                       new_bits_not_set = tarval_rotl(vrp_left->bits_not_set, get_Const_tarval(right));
                }
                break;
        }
@@ -572,7 +571,7 @@ void set_vrp_data(ir_graph *irg)
                        /* if something changed, add successors to worklist*/
                        for (i = get_irn_n_outs(node) - 1; i >= 0; --i) {
                                succ =  get_irn_out(node, i);
-                               waitq_put(env->workqueue, node);
+                               waitq_put(env->workqueue, succ);
                        }
                }
        }
index 672e18a..8bc39fa 100644 (file)
@@ -955,7 +955,7 @@ static void get_head_outs(ir_node *node, void *env)
  * (Some blocks need to be removed once again.)
  * Returns 1 if the given block belongs to the condition chain.
  */
-static unsigned find_condition_chain(ir_node *block)
+static void find_condition_chain(ir_node *block)
 {
        const    ir_edge_t *edge;
        unsigned mark = 0;
@@ -978,7 +978,7 @@ static unsigned find_condition_chain(ir_node *block)
         * continuing with another subtree. */
        if (loop_info.cc_size + nodes_n > opt_params.max_cc_size) {
                set_Block_mark(block, 0);
-               return 0;
+               return;
        }
 
        /* Check if block only has a jmp instruction. */
@@ -1041,8 +1041,6 @@ static unsigned find_condition_chain(ir_node *block)
                if (is_in_loop(src) && ! irn_visited(src))
                        find_condition_chain(src);
        }
-
-       return mark;
 }
 
 /**
index d067a85..ab9bd39 100644 (file)
@@ -1103,8 +1103,8 @@ static void check_for_cf_meet(ir_node *block, void *ctx)
                if (! is_Jmp(pred) && ! is_Raise(pred) && !is_Bad(pred))
                        continue;
 
-               preds[k].pred  = pred;
-               preds[k].index = i;
+               preds[k++].pred  = pred;
+               preds[k++].index = i;
        }
 
        if (k > 1)
index 0e4141d..06d7a9c 100644 (file)
@@ -126,7 +126,8 @@ static void process_call(ir_node *call, ir_entity *callee, q_set *hmap)
 
        n_params = get_Call_n_params(call);
 
-       /* Beware: we cannot clone variadic parameters as well as the
+       /* TODO
+        * Beware: we cannot clone variadic parameters as well as the
         * last non-variadic one, which might be needed for the va_start()
         * magic
         */