From 4db6c5b3708319ba7eff5489e1fe1c7a01fdd866 Mon Sep 17 00:00:00 2001 From: Sebastian Buchwald Date: Fri, 27 May 2011 13:31:47 +0200 Subject: [PATCH] Adapted some issues noticed during removal of unused variables. --- ir/ana/vrp.c | 7 +++---- ir/opt/loop.c | 6 ++---- ir/opt/opt_blocks.c | 4 ++-- ir/opt/proc_cloning.c | 3 ++- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ir/ana/vrp.c b/ir/ana/vrp.c index 4d61c0435..d1d0a6752 100644 --- a/ir/ana/vrp.c +++ b/ir/ana/vrp.c @@ -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); } } } diff --git a/ir/opt/loop.c b/ir/opt/loop.c index 672e18aa7..8bc39fa52 100644 --- a/ir/opt/loop.c +++ b/ir/opt/loop.c @@ -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; } /** diff --git a/ir/opt/opt_blocks.c b/ir/opt/opt_blocks.c index d067a8526..ab9bd3984 100644 --- a/ir/opt/opt_blocks.c +++ b/ir/opt/opt_blocks.c @@ -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) diff --git a/ir/opt/proc_cloning.c b/ir/opt/proc_cloning.c index 0e4141d35..06d7a9c84 100644 --- a/ir/opt/proc_cloning.c +++ b/ir/opt/proc_cloning.c @@ -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 */ -- 2.20.1