* 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"
#include "besched_t.h"
#include "benode_t.h"
#include "beirg_t.h"
-#include "bera.h"
+#include "beintlive_t.h"
static int my_values_interfere(const ir_node *a, const ir_node *b);
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;
return result;
}
-static void collect(be_verify_spillslots_env_t *env, ir_node *node, ir_node *reload, ir_entity* ent);
+static
+void collect(be_verify_spillslots_env_t *env, ir_node *node, ir_node *reload, ir_entity* ent);
-static void check_entity(be_verify_spillslots_env_t *env, ir_node *node, ir_entity *ent) {
+static
+void be_check_entity(be_verify_spillslots_env_t *env, ir_node *node, ir_entity *ent) {
if(ent == NULL) {
ir_fprintf(stderr, "Verify warning: Node %+F in block %+F(%s) should have an entity assigned\n",
node, get_nodes_block(node), get_irg_dump_name(env->irg));
}
}
-static void collect_spill(be_verify_spillslots_env_t *env, ir_node *node, ir_node *reload, ir_entity* ent) {
+static
+void collect_spill(be_verify_spillslots_env_t *env, ir_node *node, ir_node *reload, ir_entity* ent) {
ir_entity *spillent = arch_get_frame_entity(env->arch_env, node);
- check_entity(env, node, spillent);
+ be_check_entity(env, node, spillent);
get_spill(env, node, ent);
if(spillent != ent) {
out = get_Proj_proj(node);
spillent = be_get_MemPerm_out_entity(memperm, out);
- check_entity(env, memperm, spillent);
+ be_check_entity(env, memperm, spillent);
if(spillent != ent) {
ir_fprintf(stderr, "Verify warning: MemPerm %+F has different entity than reload %+F in block %+F(%s)\n",
node, reload, get_nodes_block(node), get_irg_dump_name(env->irg));
return;
}
ent = arch_get_frame_entity(env->arch_env, node);
- check_entity(env, node, ent);
+ be_check_entity(env, node, ent);
collect(env, spill, node, ent);
ARR_APP1(ir_node*, env->reloads, node);
spill_t *spill = find_spill(env, node);
if(be_is_Spill(node)) {
ir_entity *ent = arch_get_frame_entity(env->arch_env, node);
- check_entity(env, node, ent);
+ be_check_entity(env, node, ent);
}
if(spill == NULL) {