X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeverify.c;h=a55114ade2ad7351803b17efdfa07f09390574a6;hb=0318dc1a48ce72b311592c28affc31fabc95f026;hp=011592654f477de82581e58db95c1849766d2b5b;hpb=093b74c8bb7c99418b4ee0dc97229cb00c448f81;p=libfirm diff --git a/ir/be/beverify.c b/ir/be/beverify.c index 011592654..a55114ade 100644 --- a/ir/be/beverify.c +++ b/ir/be/beverify.c @@ -45,6 +45,7 @@ #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); @@ -155,8 +156,8 @@ static void verify_schedule_walker(ir_node *block, void *data) { 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; /* @@ -205,15 +206,16 @@ static void verify_schedule_walker(ir_node *block, void *data) } /* 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", @@ -224,7 +226,7 @@ static void verify_schedule_walker(ir_node *block, void *data) /* 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 @@ -280,7 +282,7 @@ static void verify_schedule_walker(ir_node *block, void *data) 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) {