reindent escape_ana.c in firm style
[libfirm] / ir / opt / opt_osr.c
index 0f30193..1916430 100644 (file)
@@ -1275,7 +1275,8 @@ static void lftr(ir_graph *irg, iv_env *env)
  */
 static void clear_and_fix(ir_node *irn, void *env)
 {
-       int *moved = (int*)env;
+       (void)env;
+
        set_irn_link(irn, NULL);
 
        if (is_Proj(irn)) {
@@ -1284,7 +1285,6 @@ static void clear_and_fix(ir_node *irn, void *env)
 
                if (get_nodes_block(irn) != pred_block) {
                        set_nodes_block(irn, pred_block);
-                       *moved = 1;
                }
        }
 }  /* clear_and_fix */
@@ -1294,7 +1294,6 @@ static void clear_and_fix(ir_node *irn, void *env)
 void remove_phi_cycles(ir_graph *irg)
 {
        iv_env env;
-       int    projs_moved;
 
        FIRM_DBG_REGISTER(dbg, "firm.opt.remove_phi");
 
@@ -1317,10 +1316,7 @@ void remove_phi_cycles(ir_graph *irg)
         * the same block as their predecessors.
         * This can improve the placement of new nodes.
         */
-       projs_moved = 0;
-       irg_walk_graph(irg, NULL, clear_and_fix, &projs_moved);
-       if (projs_moved)
-               set_irg_outs_inconsistent(irg);
+       irg_walk_graph(irg, NULL, clear_and_fix, NULL);
 
        /* we need outs for calculating the post order */
        assure_irg_outs(irg);
@@ -1334,7 +1330,6 @@ void remove_phi_cycles(ir_graph *irg)
        ir_free_resources(irg, IR_RESOURCE_IRN_LINK);
 
        if (env.replaced) {
-               set_irg_outs_inconsistent(irg);
                DB((dbg, LEVEL_1, "remove_phi_cycles: %u Cycles removed\n\n", env.replaced));
        }
 
@@ -1406,9 +1401,9 @@ static void fix_adds_and_subs(ir_node *irn, void *ctx)
                        if (mode_is_int(l_mode)) {
                                /* Usually, Sub(I*,P) is an error, hence the verifier rejects it.
                                 * However, it is correct in this case, so add Conv to make verifier happy. */
-                               assert (mode_is_reference(r_mode));
                                ir_node *block = get_nodes_block(right);
-                               ir_node *lconv = new_r_Conv(block,left,r_mode);
+                               ir_node *lconv = new_r_Conv(block, left, r_mode);
+                               assert(mode_is_reference(r_mode));
                                set_Sub_left(irn, lconv);
                        }
                }
@@ -1420,7 +1415,6 @@ void opt_osr(ir_graph *irg, unsigned flags)
 {
        iv_env   env;
        int      edges;
-       int      projs_moved;
 
        FIRM_DBG_REGISTER(dbg, "firm.opt.osr");
 
@@ -1440,13 +1434,10 @@ void opt_osr(ir_graph *irg, unsigned flags)
        env.process_scc   = process_scc;
 
        /* Clear all links and move Proj nodes into the
-          the same block as it's predecessors.
-          This can improve the placement of new nodes.
+        * the same block as its predecessors.
+        * This can improve the placement of new nodes.
         */
-       projs_moved = 0;
-       irg_walk_graph(irg, NULL, clear_and_fix, &projs_moved);
-       if (projs_moved)
-               set_irg_outs_inconsistent(irg);
+       irg_walk_graph(irg, NULL, clear_and_fix, NULL);
 
        /* we need dominance */
        assure_doms(irg);
@@ -1469,7 +1460,6 @@ void opt_osr(ir_graph *irg, unsigned flags)
                lftr(irg, &env);
                (void)lftr;
 
-               set_irg_outs_inconsistent(irg);
                DB((dbg, LEVEL_1, "Replacements: %u + %u (lftr)\n\n", env.replaced, env.lftr_replaced));
        }
        ir_free_resources(irg, IR_RESOURCE_IRN_LINK);