X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeblocksched.c;h=cbfb98d5c83dced10f8ef9fce6848061f1cdba63;hb=afbbc0b1ccd684c4c24bfd43d0f994123245f39f;hp=f0896253f6143db2b77845d5305d7647f8639c5a;hpb=e30e5834fd8c1c3a7d28fc66e99b91a84993bde8;p=libfirm diff --git a/ir/be/beblocksched.c b/ir/be/beblocksched.c index f0896253f..cbfb98d5c 100644 --- a/ir/be/beblocksched.c +++ b/ir/be/beblocksched.c @@ -58,6 +58,7 @@ #include "beirgmod.h" #include "bemodule.h" #include "be.h" +#include "error.h" #include "lc_opts.h" #include "lc_opts_enum.h" @@ -114,7 +115,7 @@ typedef struct _edge_t { int pos; /**< number of cfg predecessor (target) */ double execfreq; /**< the frequency */ int highest_execfreq; /**< flag that indicates whether this edge is the edge with the highest - execfreq pointing away from this block */ + execfreq pointing away from this block */ } edge_t; typedef struct _blocksched_env_t { @@ -272,11 +273,10 @@ static void pick_block_successor(blocksched_entry_t *entry, blocksched_env_t *en const ir_edge_t *edge; double best_succ_execfreq; - if (irn_visited(block)) + if (irn_visited_else_mark(block)) return; env->blockcount++; - mark_irn_visited(block); DBG((dbg, LEVEL_1, "Pick succ of %+F\n", block)); @@ -764,6 +764,6 @@ ir_node **be_create_block_schedule(ir_graph *irg, ir_exec_freq *execfreqs) #endif /* WITH_ILP */ } - assert(0 && "unknown blocksched algo"); + panic("unknown blocksched algo"); return NULL; }