BugFix: equivalent_node_Bound() was too greedy, reduced to a safe minimum (now mostly...
[libfirm] / ir / ir / irgmod.c
index 0a06562..6a4039a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -54,11 +54,12 @@ void turn_into_tuple(ir_node *node, int arity) {
        } else {
                /* don't use get_nodes_block here, we allow turn_into_tuple for unpinned nodes */
                ir_node *block = get_irn_n(node, -1);
-               /* Allocate new array, don't free old in_array, it's on the obstack. */
                edges_node_deleted(node, current_ir_graph);
+               /* Allocate new array, don't free old in_array, it's on the obstack. */
                node->in = NEW_ARR_D(ir_node *, current_ir_graph->obst, arity+1);
                /* clear the new in array, else edge_notify tries to delete garbage */
                memset(node->in, 0, (arity+1) * sizeof(node->in[0]));
+               /* set the block back */
                set_irn_n(node, -1, block);
        }
 }