* CVS-Id: $Id$
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#include <limits.h>
return ! env.problem_found;
}
+
+
+//---------------------------------------------------------------------------
+
+
+
typedef struct be_verify_schedule_env_t_ {
- int problem_found; /**< flags indicating if there was a problem */
- bitset_t *scheduled; /**< bitset of scheduled nodes */
- ir_graph *irg; /**< the irg to check */
+ int problem_found; /**< flags indicating if there was a problem */
+ bitset_t *scheduled; /**< bitset of scheduled nodes */
+ ir_graph *irg; /**< the irg to check */
+ const arch_env_t *arch_env; /**< the arch_env */
} be_verify_schedule_env_t;
/**
}
}
-static int should_be_scheduled(ir_node *node) {
+static int should_be_scheduled(be_verify_schedule_env_t *env, ir_node *node) {
if(is_Block(node))
return -1;
break;
}
+ if(arch_irn_get_flags(env->arch_env, node) & arch_irn_flags_ignore)
+ return -1;
+
return 1;
}
int should_be;
int scheduled;
- should_be = should_be_scheduled(node);
+ should_be = should_be_scheduled(env, node);
if(should_be == -1)
return;
/**
* Start a walk over the irg and check schedule.
*/
-int be_verify_schedule(ir_graph *irg)
+int be_verify_schedule(const be_irg_t *birg)
{
be_verify_schedule_env_t env;
env.problem_found = 0;
- env.scheduled = bitset_alloca(get_irg_last_idx(irg));
- env.irg = irg;
+ env.irg = be_get_birg_irg(birg);
+ env.scheduled = bitset_alloca(get_irg_last_idx(env.irg));
+ env.arch_env = birg->main_env->arch_env;
- irg_block_walk_graph(irg, verify_schedule_walker, NULL, &env);
+ irg_block_walk_graph(env.irg, verify_schedule_walker, NULL, &env);
// check if all nodes are scheduled
- irg_walk_graph(irg, check_schedule, NULL, &env);
+ irg_walk_graph(env.irg, check_schedule, NULL, &env);
return ! env.problem_found;
}
} else if(is_Phi(node) && get_irn_mode(node) == mode_M) {
collect_memphi(env, node, reload, ent);
} else {
+ // Disabled for now, spills might get transformed by the backend
+#if 0
ir_fprintf(stderr, "Verify warning: No spill, memperm or memphi attached to node %+F found from node %+F in block %+F(%s)\n",
node, reload, get_nodes_block(node), get_irg_dump_name(env->irg));
env->problem_found = 1;
+#endif
}
}