Changed implementation of tr module.
[libfirm] / ir / ir / irvrfy.c
index 9f0b4f7..1deb11b 100644 (file)
@@ -3,9 +3,14 @@
 **
 ** Authors: Christian Schaefer
 **
-**
+x**
 */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+# include "irgraph_t.h"
 # include "irvrfy.h"
 # include "irgwalk.h"
 
@@ -25,9 +30,6 @@ irn_vrfy (ir_node *n)
   mymode = get_irn_mode (n);
   in = get_irn_in (n);
 
-//  IR_OP_VRFY (opcode);
-//  IR_MODE_VRFY (mymode);
-
   switch (opcode) {
 
   case iro_Start:
@@ -54,8 +56,8 @@ irn_vrfy (ir_node *n)
     break;
   case iro_Return:
     op1mode = get_irn_mode(in[1]);
-      /* Return: BB x M x data1 x ... x datan --> X */
-    //printf("mode: %s, code %s\n", ID_TO_STR(n->mode->name), ID_TO_STR(n->op->name));
+    /* Return: BB x M x data1 x ... x datan --> X */
+    /* printf("mode: %s, code %s\n", ID_TO_STR(n->mode->name), ID_TO_STR(n->op->name));*/
     assert ( op1mode == mode_M );  /* operand M */
     for (i=2; i < get_irn_arity(n); i++) {
       assert ( mode_is_data(get_irn_mode(in[i])) );  /* operand datai */
@@ -265,7 +267,8 @@ irn_vrfy (ir_node *n)
            /* Phi: BB x dataM^n --> dataM */
     /* for some reason "<=" aborts. Is there a problem with get_store? */
     for (i=1; i < get_irn_arity(n); i++) {
-      assert ( get_irn_mode(in[i]) == mymode );
+      if (!is_Bad(in[i]))
+       assert ( get_irn_mode(in[i]) == mymode );
     };
     assert ( mode_is_dataM(mymode) );
     break;