changed bounds of arrays from plain ints to irnode*s.
[libfirm] / ir / ir / iropt.c
index d668c6a..25036d8 100644 (file)
@@ -270,10 +270,12 @@ equivalent_node (ir_node *n)
          && get_irn_op(get_Block_cfgpred(n, 0)) == op_Jmp) {
        n = get_nodes_Block(get_Block_cfgpred(n, 0));
 
-      } else if (n != current_ir_graph->start_block) {
+      } else if ((n != current_ir_graph->start_block) &&
+                (n != current_ir_graph->end_block)     ) {
        int i;
        /* If all inputs are dead, this block is dead too, except if it is
-           the start block.  This is a step of unreachable code elimination */
+           the start or end block.  This is a step of unreachable code
+          elimination */
        for (i = 0; i < get_Block_n_cfgpreds(n); i++) {
          if (!is_Bad(get_Block_cfgpred(n, i))) break;
        }
@@ -766,8 +768,7 @@ vt_cmp (const void *elt, const void *key)
     return (get_irn_symconst_attr(a).num != get_irn_symconst_attr(b).num)
       || (get_irn_symconst_attr(a).tori.typ != get_irn_symconst_attr(b).tori.typ);
   case iro_Call:
-    return (get_irn_call_attr(a)->kind != get_irn_call_attr(b)->kind)
-      || (get_irn_call_attr(a)->arity != get_irn_call_attr(b)->arity);
+    return (get_irn_call_attr(a) != get_irn_call_attr(b));
   case iro_Sel:
     return (get_irn_sel_attr(a).ent->kind != get_irn_sel_attr(b).ent->kind)
       || (get_irn_sel_attr(a).ent->name != get_irn_sel_attr(b).ent->name)