fixed bug: Wrong opcode range was requested in be
[libfirm] / ir / be / beverify.c
index 7599a17..f9b825f 100644 (file)
  * PURPOSE.
  */
 
-/*
- * Author:    Matthias Braun
- * Date:      05.05.2006
- * Copyright: (c) Universitaet Karlsruhe
- * License:   This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- * CVS-Id:    $Id$
+/**
+ * @file
+ * @brief       Various verify routines that check a scheduled graph for correctness.
+ * @author      Matthias Braun
+ * @date        05.05.2006
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -46,6 +46,7 @@
 #include "besched_t.h"
 #include "benode_t.h"
 #include "beirg_t.h"
+#include "beintlive_t.h"
 
 static int my_values_interfere(const ir_node *a, const ir_node *b);
 
@@ -264,8 +265,11 @@ static int should_be_scheduled(be_verify_schedule_env_t *env, ir_node *node) {
                if(is_Phi(node) || is_Sync(node) || is_Pin(node))
                        return 0;
        }
-       if(is_Proj(node) && get_irn_mode(node) == mode_X)
-               return 0;
+       if(is_Proj(node)) {
+               if(get_irn_mode(node) == mode_X)
+                       return 0;
+               return should_be_scheduled(env, get_Proj_pred(node));
+       }
        if(be_is_Keep(node) && get_irn_opcode(get_nodes_block(node)) == iro_Bad)
                return 0;