Simplify x87_dump_stack().
[libfirm] / ir / be / bessaconstr.c
index 7421805..3b06648 100644 (file)
@@ -297,7 +297,6 @@ static void set_operands(be_ssa_construction_env_t *env, ir_node *use, ir_node *
  */
 static void process_block(be_ssa_construction_env_t *env, ir_node *block)
 {
-       ir_node     *node;
        ir_node     *def        = NULL;
        constr_info *block_info = get_or_set_info(env, block);
 
@@ -353,22 +352,17 @@ static ir_node *search_def_end_of_block(be_ssa_construction_env_t *env,
                        }
                }
                else {
-                       ir_node *def = NULL;
-
                        /* Search the last definition of the block. */
                        sched_foreach_reverse(block, def) {
                                if (is_definition(env, def)) {
                                        constr_info *info = get_info(env, def);
-                                       def = info->u.definition;
-                                       DBG((dbg, LEVEL_3, "\t...found definition %+F\n", def));
-
+                                       DBG((dbg, LEVEL_3, "\t...found definition %+F\n", info->u.definition));
+                                       block_info->u.last_definition = info->u.definition;
                                        break;
                                }
                        }
 
-                       assert(def && "No definition found");
-
-                       block_info->u.last_definition = def;
+                       assert(block_info->u.last_definition && "No definition found");
                }
 
                return block_info->u.last_definition;
@@ -416,7 +410,7 @@ void be_ssa_construction_init(be_ssa_construction_env_t *env, ir_graph *irg)
        ir_node *sb   = get_irg_start_block(irg);
        int n_blocks  = get_Block_dom_max_subtree_pre_num(sb);
 
-       stat_ev_ctx_push_fobj("bessaconstr", irg);
+       stat_ev_ctx_push_fmt("bessaconstr", "%+F", irg);
        stat_ev_tim_push();
 
        (void) n_blocks;
@@ -581,12 +575,11 @@ void be_ssa_construction_fix_users_array(be_ssa_construction_env_t *env,
        stat_ev_tim_push();
 
        for (i = 0; i < nodes_len; ++i) {
-               const ir_edge_t *edge, *next;
                ir_node *value = nodes[i];
                DBG((dbg, LEVEL_3, "\tfixing users of %+F\n", value));
                introduce_definition(env, value);
 
-               foreach_out_edge_safe(value, edge, next) {
+               foreach_out_edge_safe(value, edge) {
                        ir_node *use   = get_edge_src_irn(edge);
 
                        if (env->ignore_uses != NULL &&