bearch: Dump the output requirement and the assigned register in the same line for...
[libfirm] / ir / be / beabihelper.c
index adfc774..75ca7e8 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "beabihelper.h"
 #include "bearch.h"
+#include "beirg.h"
 #include "benode.h"
 #include "besched.h"
 #include "ircons.h"
@@ -413,10 +414,8 @@ static ir_node *add_to_keep(ir_node *last_keep,
 void be_add_missing_keeps_node(ir_node *node)
 {
        int       n_outs, i;
-       unsigned *found_projs;
        ir_mode  *mode = get_irn_mode(node);
        ir_node  *last_keep;
-       ir_node **existing_projs;
 
        if (mode != mode_T) {
                if (!has_real_user(node)) {
@@ -436,8 +435,8 @@ void be_add_missing_keeps_node(ir_node *node)
        if (n_outs <= 0)
                return;
 
-       rbitset_alloca(found_projs, n_outs);
-       existing_projs = ALLOCANZ(ir_node*, n_outs);
+       unsigned *const found_projs    = rbitset_alloca(n_outs);
+       ir_node **const existing_projs = ALLOCANZ(ir_node*, n_outs);
        foreach_out_edge(node, edge) {
                ir_node *succ = get_edge_src_irn(edge);
                ir_mode *mode = get_irn_mode(succ);
@@ -724,10 +723,8 @@ static void create_stores_for_type(ir_graph *irg, ir_type *type)
                }
        }
 
-       if (mem != initial_mem) {
-               edges_reroute(initial_mem, mem);
-               set_Store_mem(first_store, initial_mem);
-       }
+       if (mem != initial_mem)
+               edges_reroute_except(initial_mem, mem, first_store);
 }
 
 void be_add_parameter_entity_stores(ir_graph *irg)