#include "benode.h"
#include "beirg.h"
#include "beintlive_t.h"
+#include "belistsched.h"
static int my_values_interfere(const ir_node *a, const ir_node *b);
{
be_verify_schedule_env_t *env = (be_verify_schedule_env_t*) data;
ir_node *node;
- ir_node *non_phi_found = NULL;
- int cfchange_found = 0;
+ ir_node *non_phi_found = NULL;
+ ir_node *cfchange_found = NULL;
int last_timestep = INT_MIN;
/*
}
/* Check for control flow changing nodes */
- if (is_cfop(node) && get_irn_opcode(node) != iro_Start) {
+ if (is_cfop(node)) {
/* check, that only one CF operation is scheduled */
- if (cfchange_found == 1) {
- ir_fprintf(stderr, "Verify Warning: More than 1 control flow changing node (%+F) scheduled in block %+F (%s)\n",
- node, block, get_irg_dump_name(env->irg));
+ if (cfchange_found != NULL) {
+ ir_fprintf(stderr, "Verify Warning: Additional control flow changing node %+F scheduled after %+F in block %+F (%s)\n",
+ node, block, cfchange_found, get_irg_dump_name(env->irg));
env->problem_found = 1;
+ } else {
+ cfchange_found = node;
}
- cfchange_found = 1;
- } else if (cfchange_found) {
+ } else if (cfchange_found != NULL) {
/* proj and keepany aren't real instructions... */
if (!is_Proj(node) && !be_is_Keep(node)) {
ir_fprintf(stderr, "Verify Warning: Node %+F scheduled after control flow changing node in block %+F (%s)\n",
/* Check that all uses come before their definitions */
if (!is_Phi(node)) {
- int nodetime = sched_get_time_step(node);
+ sched_timestep_t nodetime = sched_get_time_step(node);
for (i = 0, arity = get_irn_arity(node); i < arity; ++i) {
ir_node *arg = get_irn_n(node, i);
if (get_nodes_block(arg) != block
static void check_schedule(ir_node *node, void *data)
{
be_verify_schedule_env_t *env = (be_verify_schedule_env_t*)data;
- bool should_be = to_appear_in_schedule(node);
+ bool should_be = !is_Proj(node) && !(arch_irn_get_flags(node) & arch_irn_flags_not_scheduled);
bool scheduled = bitset_is_set(env->scheduled, get_irn_idx(node));
if (should_be != scheduled) {