fix a bunch of warnings reported by cparser
[libfirm] / ir / be / bechordal.c
index ea259f6..9b5da2b 100644 (file)
@@ -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 = {