BugFix: equivalent_node_Bound() was too greedy, reduced to a safe minimum (now mostly...
[libfirm] / ir / ir / irgmod.c
index 753303c..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);
        }
 }
@@ -210,11 +211,6 @@ void part_block(ir_node *node) {
        set_irn_link(new_block, phi);
        set_irn_link(old_block, NULL);
        while (phi) {
-               /* XXX TODO Matze: this looks buggy, but I'm not sure what would be
-                  the correct thing... */
-               if(get_nodes_block(phi) == old_block);   /* @@@ inlinening chokes on phis that don't
-                                                                                                obey this condition.  How do they get into
-                                                                                                the list??? Example: InterfaceIII */
                set_nodes_block(phi, new_block);
                phi = get_irn_link(phi);
        }