X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeblocksched.c;h=872c63040cda974023d6f0121817a743d42dd8ff;hb=dd4cd761ab637d4488c7e29f49843b1b02366acf;hp=39e614a97c8f7c6a8184e0ea0f6d5a283f844725;hpb=5af4cb6fd26054ef16c8da79d534abacb2a32c6e;p=libfirm diff --git a/ir/be/beblocksched.c b/ir/be/beblocksched.c index 39e614a97..872c63040 100644 --- a/ir/be/beblocksched.c +++ b/ir/be/beblocksched.c @@ -58,10 +58,10 @@ #include "beirgmod.h" #include "bemodule.h" #include "be.h" +#include "error.h" -#include -#include -#include +#include "lc_opts.h" +#include "lc_opts_enum.h" #ifdef WITH_ILP #include @@ -115,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 { @@ -362,7 +362,7 @@ static blocksched_entry_t *finish_block_schedule(blocksched_env_t *env) ir_node *startblock = get_irg_start_block(irg); blocksched_entry_t *entry = get_irn_link(startblock); - set_using_irn_visited(irg); + ir_reserve_resources(irg, IR_RESOURCE_IRN_VISITED); inc_irg_visited(irg); env->worklist = new_pdeq(); @@ -370,7 +370,7 @@ static blocksched_entry_t *finish_block_schedule(blocksched_env_t *env) assert(pdeq_empty(env->worklist)); del_pdeq(env->worklist); - clear_using_irn_visited(irg); + ir_free_resources(irg, IR_RESOURCE_IRN_VISITED); return entry; } @@ -713,8 +713,7 @@ static ir_node **create_extbb_block_schedule(ir_graph *irg, ir_exec_freq *execfr list.end = NULL; list.n_blks = 0; - set_using_irn_link(irg); - set_using_irn_visited(irg); + ir_reserve_resources(irg, IR_RESOURCE_IRN_VISITED | IR_RESOURCE_IRN_LINK); inc_irg_block_visited(irg); create_block_list(get_irg_start_block(irg), &list); @@ -727,8 +726,7 @@ static ir_node **create_extbb_block_schedule(ir_graph *irg, ir_exec_freq *execfr blk_list[i] = b; } - clear_using_irn_link(irg); - clear_using_irn_visited(irg); + ir_free_resources(irg, IR_RESOURCE_IRN_VISITED | IR_RESOURCE_IRN_LINK); return blk_list; } @@ -767,6 +765,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; }