replaced all recursive computed_value calls ba value_of()
[libfirm] / ir / ir / irvrfy.c
index 68342bb..4b1e4de 100644 (file)
@@ -391,6 +391,7 @@ vrfy_Proj_proj(ir_node *p, ir_graph *irg) {
       if (proj == pn_Load_res) {
        ir_node *ptr = get_Load_ptr(pred);
        entity *ent = get_ptr_entity(ptr);
+
        if (vrfy_entities && ent && get_irg_phase_state(current_ir_graph) == phase_high) {
          /* do NOT check this for lowered phases, see comment on Store */
          ASSERT_AND_RET_DBG(
@@ -401,7 +402,7 @@ vrfy_Proj_proj(ir_node *p, ir_graph *irg) {
        }
        else {
          ASSERT_AND_RET_DBG(
-                            mode_is_data(mode),
+                            mode_is_data(mode) && mode == get_Load_mode(pred),
                             "wrong data Proj from Load", 0,
                             show_proj_failure(p);
                             );
@@ -558,7 +559,7 @@ int irn_vrfy_irg(ir_node *n, ir_graph *irg)
 
   if (!opt_do_node_verification) return 1;
 
-  if (! interprocedural_view) {
+  if (! get_interprocedural_view()) {
     /*
      * do NOT check placement in interprocedural view, as we don't always know
      * the "right" graph ...
@@ -608,7 +609,7 @@ int irn_vrfy_irg(ir_node *n, ir_graph *irg)
                          "End Block node", 0);
         }
       /*  irg attr must == graph we are in. */
-      if (! interprocedural_view) {
+      if (! get_interprocedural_view()) {
         ASSERT_AND_RET(((get_irn_irg(n) && get_irn_irg(n) == irg)), "Block node has wrong irg attribute", 0);
       }
 
@@ -744,12 +745,17 @@ int irn_vrfy_irg(ir_node *n, ir_graph *irg)
       /* Call: BB x M x ref x data1 x ... x datan
          --> M x datan+1 x ... x data n+m */
       ASSERT_AND_RET( op1mode == mode_M && mode_is_reference(op2mode), "Call node", 0 );  /* operand M x ref */
+
+      mt = get_Call_type(n);
+      if(get_unknown_type() == mt) {
+       break;
+      }
+
       for (i=3; i < get_irn_arity(n); i++) {
         ASSERT_AND_RET( mode_is_data(get_irn_mode(in[i])), "Call node", 0 );  /* operand datai */
       };
       ASSERT_AND_RET( mymode == mode_T, "Call result not a tuple", 0 );   /* result T */
       /* Compare arguments of node with those of type */
-      mt = get_Call_type(n);
 
       if (get_method_variadicity(mt) == variadicity_variadic) {
         ASSERT_AND_RET_DBG(