fixed bug: Wrong opcode range was requested in be
[libfirm] / ir / be / beverify.c
index 2368a9a..f9b825f 100644 (file)
@@ -1,9 +1,28 @@
 /*
- * Author:    Matthias Braun
- * Date:      05.05.2006
- * Copyright: (c) Universitaet Karlsruhe
- * License:   This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
- * CVS-Id:    $Id$
+ * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
+/**
+ * @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"
@@ -27,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);
 
@@ -245,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;