- fixed error with cse and programs containing endless loops:
authorRubino Geiß <rubino@ipd.info.uni-karlsruhe.de>
Thu, 2 Sep 2004 11:53:00 +0000 (11:53 +0000)
committerRubino Geiß <rubino@ipd.info.uni-karlsruhe.de>
Thu, 2 Sep 2004 11:53:00 +0000 (11:53 +0000)
start block somtimes only reached after keep alives
- added assertion for in arrays of irnodes

[r3812]

ir/ir/irgopt.c
ir/ir/irnode.c

index 7d31766..f3e5c4c 100644 (file)
@@ -361,7 +361,6 @@ copy_graph (void) {
   irg_walk(get_nodes_block(oe), copy_node, copy_preds, NULL);
   /* copy_preds for the end node ... */
   set_nodes_block(ne, get_new_node(get_nodes_block(oe)));
-  set_nodes_block(nb, get_new_node(get_nodes_block(ob)));
 
   /*- ... and now the keep alives. -*/
   /* First pick the not marked block nodes and walk them.  We must pick these
@@ -391,6 +390,9 @@ copy_graph (void) {
       add_End_keepalive(ne, get_new_node(ka));
     }
   }
+
+       /* start block somtimes only reached after keep alives */
+  set_nodes_block(nb, get_new_node(get_nodes_block(ob)));
 }
 
 /**
index fcd49ef..97e0392 100644 (file)
@@ -224,6 +224,7 @@ ir_node *
 void
 set_irn_n (ir_node *node, int n, ir_node *in) {
   assert(node && -1 <= n && n < get_irn_arity(node));
+       assert(in && in->kind == k_ir_node);
   if ((n == -1) && (get_irn_opcode(node) == iro_Filter)) {
     /* Change block pred in both views! */
     node->in[n + 1] = in;