X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbechordal.c;h=9b5da2b033cbc3fd957ece0e81e4e99f40b066b0;hb=10d435353850d6f7c858e5b9e71fb06443855d95;hp=ea259f6c177b6e676b25e1a0f3bcafc27b4ef8e4;hpb=e5bd2c37894dc003989f300e21cab5b74f37a997;p=libfirm diff --git a/ir/be/bechordal.c b/ir/be/bechordal.c index ea259f6c1..9b5da2b03 100644 --- a/ir/be/bechordal.c +++ b/ir/be/bechordal.c @@ -69,8 +69,6 @@ DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;) -#define NO_COLOR (-1) - #define DUMP_INTERVALS typedef struct be_chordal_alloc_env_t { @@ -171,7 +169,7 @@ static void pair_up_operands(const be_chordal_alloc_env_t *alloc_env, be_insn_t } static ir_node *handle_constraints(be_chordal_alloc_env_t *alloc_env, - ir_node *irn, int *silent) + ir_node *irn) { int n_regs; bitset_t *bs; @@ -188,7 +186,6 @@ static ir_node *handle_constraints(be_chordal_alloc_env_t *alloc_env, void *base = obstack_base(env->obst); be_insn_t *insn = chordal_scan_insn(env, irn); ir_node *res = insn->next_insn; - int be_silent = *silent; bipartite_t *bp; if (insn->pre_colored) { @@ -197,19 +194,6 @@ static ir_node *handle_constraints(be_chordal_alloc_env_t *alloc_env, pset_insert_ptr(alloc_env->pre_colored, insn->ops[i].carrier); } - /* - * If the current node is a barrier toggle the silent flag. - * If we are in the start block, we are ought to be silent at the beginning, - * so the toggling activates the constraint handling but skips the barrier. - * If we are in the end block we handle the in requirements of the barrier - * and set the rest to silent. - */ - if (be_is_Barrier(irn)) - *silent = !*silent; - - if (be_silent) - goto end; - /* * Perms inserted before the constraint handling phase are considered to be * correctly precolored. These Perms arise during the ABI handling phase. @@ -407,21 +391,11 @@ end: */ static void constraints(ir_node *bl, void *data) { - /* - * Start silent in the start block. - * The silence remains until the first barrier is seen. - * Each other block is begun loud. - */ - int silent = bl == get_irg_start_block(get_irn_irg(bl)); be_chordal_alloc_env_t *env = (be_chordal_alloc_env_t*)data; ir_node *irn; - /* - * If the block is the start block search the barrier and - * start handling constraints from there. - */ for (irn = sched_first(bl); !sched_is_end(irn);) { - irn = handle_constraints(env, irn, &silent); + irn = handle_constraints(env, irn); } } @@ -491,7 +465,7 @@ static void assign(ir_node *block, void *env_ptr) */ if (b->is_def && !be_is_live_in(lv, block, irn)) { const arch_register_t *reg; - int col = NO_COLOR; + int col; if (ignore || pset_find_ptr(alloc_env->pre_colored, irn)) { reg = arch_get_irn_register(irn); @@ -580,7 +554,7 @@ void be_ra_chordal_color(be_chordal_env_t *chordal_env) del_pset(env.pre_colored); } -BE_REGISTER_MODULE_CONSTRUCTOR(be_init_chordal); +BE_REGISTER_MODULE_CONSTRUCTOR(be_init_chordal) void be_init_chordal(void) { static be_ra_chordal_coloring_t coloring = {