Fixed some warning about unused variables.
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>
Fri, 27 May 2011 11:29:10 +0000 (13:29 +0200)
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>
Fri, 27 May 2011 11:33:25 +0000 (13:33 +0200)
32 files changed:
ir/ana/vrp.c
ir/be/amd64/amd64_transform.c
ir/be/arm/arm_emitter.c
ir/be/arm/arm_transform.c
ir/be/beabihelper.c
ir/be/becopyheur2.c
ir/be/beirgmod.c
ir/be/bemain.c
ir/be/benode.c
ir/be/beschedtrace.c
ir/be/bespillslots.c
ir/be/ia32/ia32_architecture.c
ir/be/ia32/ia32_common_transform.c
ir/be/ia32/ia32_emitter.c
ir/be/ia32/ia32_optimize.c
ir/be/scripts/generate_new_opcodes.pl
ir/be/sparc/sparc_transform.c
ir/ir/irmode.c
ir/ir/iropt.c
ir/kaps/optimal.c
ir/opt/escape_ana.c
ir/opt/gvn_pre.c
ir/opt/ldstopt.c
ir/opt/loop.c
ir/opt/opt_blocks.c
ir/opt/opt_confirms.c
ir/opt/opt_osr.c
ir/opt/proc_cloning.c
ir/opt/reassoc.c
ir/opt/tailrec.c
ir/tr/entity.c
ir/tr/tr_inheritance.c

index b82d6e6..4d61c04 100644 (file)
@@ -171,11 +171,10 @@ static int vrp_update_node(ir_node *node)
        }
 
        case iro_Rotl: {
-               const vrp_attr *vrp_left, *vrp_right;
+               const vrp_attr *vrp_left;
                const ir_node *right = get_Rotl_right(node);
 
                vrp_left = get_vrp_attr(get_Rotl_left(node));
-               vrp_right = get_vrp_attr(get_Rotl_right(node));
 
                /* We can only compute this if the right value is a constant*/
                if (is_Const(right)) {
@@ -187,10 +186,9 @@ static int vrp_update_node(ir_node *node)
        }
 
        case iro_Shl: {
-               const vrp_attr *vrp_left, *vrp_right;
+               const vrp_attr *vrp_left;
                const ir_node *right = get_Shl_right(node);
                vrp_left = get_vrp_attr(get_Shl_left(node));
-               vrp_right = get_vrp_attr(get_Shl_right(node));
 
                /* We can only compute this if the right value is a constant*/
                if (is_Const(right)) {
@@ -201,11 +199,10 @@ static int vrp_update_node(ir_node *node)
        }
 
        case iro_Shr: {
-               const vrp_attr *vrp_left, *vrp_right;
+               const vrp_attr *vrp_left;
                const ir_node *right = get_Shr_right(node);
 
                vrp_left = get_vrp_attr(get_Shr_left(node));
-               vrp_right = get_vrp_attr(get_Shr_right(node));
 
                /* We can only compute this if the right value is a constant*/
                if (is_Const(right)) {
@@ -216,11 +213,10 @@ static int vrp_update_node(ir_node *node)
        }
 
        case iro_Shrs: {
-               const vrp_attr *vrp_left, *vrp_right;
+               const vrp_attr *vrp_left;
                const ir_node *right = get_Shrs_right(node);
 
                vrp_left = get_vrp_attr(get_Shrs_left(node));
-               vrp_right = get_vrp_attr(get_Shrs_right(node));
 
                /* We can only compute this if the right value is a constant*/
                if (is_Const(right)) {
index 6d4d6df..9ba3d06 100644 (file)
@@ -361,7 +361,6 @@ static ir_node *gen_Conv(ir_node *node)
        } else { /* complete in gp registers */
                int src_bits = get_mode_size_bits(src_mode);
                int dst_bits = get_mode_size_bits(dst_mode);
-               int min_bits;
                ir_mode *min_mode;
 
                if (src_bits == dst_bits) {
@@ -370,10 +369,8 @@ static ir_node *gen_Conv(ir_node *node)
                }
 
                if (src_bits < dst_bits) {
-                       min_bits = src_bits;
                        min_mode = src_mode;
                } else {
-                       min_bits = dst_bits;
                        min_mode = dst_mode;
                }
 
index f09fa45..035be5b 100644 (file)
@@ -329,7 +329,6 @@ static void emit_arm_SymConst(const ir_node *irn)
 {
        const arm_SymConst_attr_t *attr = get_arm_SymConst_attr_const(irn);
        sym_or_tv_t key, *entry;
-       unsigned label;
 
        key.u.entity  = attr->entity;
        key.is_entity = true;
@@ -339,7 +338,6 @@ static void emit_arm_SymConst(const ir_node *irn)
                /* allocate a label */
                entry->label = get_unique_label();
        }
-       label = entry->label;
 
        /* load the symbol indirect */
        be_emit_cstring("\tldr ");
@@ -368,7 +366,6 @@ static void emit_arm_FrameAddr(const ir_node *irn)
 static void emit_arm_fConst(const ir_node *irn)
 {
        sym_or_tv_t key, *entry;
-       unsigned label;
        ir_mode *mode;
 
        key.u.tv      = get_fConst_value(irn);
@@ -379,7 +376,6 @@ static void emit_arm_fConst(const ir_node *irn)
                /* allocate a label */
                entry->label = get_unique_label();
        }
-       label = entry->label;
 
        /* load the tarval indirect */
        mode = get_irn_mode(irn);
index 620ac22..3ba7820 100644 (file)
@@ -1752,7 +1752,6 @@ static ir_node *get_stack_pointer_for(ir_node *node)
 {
        /* get predecessor in stack_order list */
        ir_node *stack_pred = be_get_stack_pred(abihelper, node);
-       ir_node *stack_pred_transformed;
        ir_node *stack;
 
        if (stack_pred == NULL) {
@@ -1762,8 +1761,8 @@ static ir_node *get_stack_pointer_for(ir_node *node)
                return sp_proj;
        }
 
-       stack_pred_transformed = be_transform_node(stack_pred);
-       stack                  = (ir_node*)pmap_get(node_to_stack, stack_pred);
+       be_transform_node(stack_pred);
+       stack = (ir_node*)pmap_get(node_to_stack, stack_pred);
        if (stack == NULL) {
                return get_stack_pointer_for(stack_pred);
        }
index 0aec141..5b5fe69 100644 (file)
@@ -396,7 +396,6 @@ static bool has_real_user(const ir_node *node)
 static ir_node *add_to_keep(ir_node *last_keep,
                             const arch_register_class_t *cls, ir_node *node)
 {
-       const ir_node *op;
        if (last_keep != NULL) {
                be_Keep_add_node(last_keep, cls, node);
        } else {
@@ -410,7 +409,6 @@ static ir_node *add_to_keep(ir_node *last_keep,
                        sched_add_after(schedpoint, last_keep);
                }
        }
-       op = skip_Proj_const(node);
        return last_keep;
 }
 
index c223139..7773b5a 100644 (file)
@@ -842,14 +842,13 @@ static void apply_coloring(co2_cloud_irn_t *ci, col_t col, int depth)
 {
        const ir_node *irn = ci->inh.irn;
        int *front   = FRONT_BASE(ci, col);
-       int i, ok;
+       int i;
        struct list_head changed;
 
        INIT_LIST_HEAD(&changed);
 
        DBG((ci->cloud->env->dbg, LEVEL_2, "%2{firm:indent}setting %+F to %d\n", depth, irn, col));
-       ok = change_color_single(ci->cloud->env, irn, col, &changed, depth);
-       // assert(ok && "Color changing may not fail while committing the coloring");
+       change_color_single(ci->cloud->env, irn, col, &changed, depth);
        materialize_coloring(&changed);
 
        for (i = 0; i < ci->mst_n_childs; ++i) {
index ac61fd9..ef8e6b5 100644 (file)
@@ -87,7 +87,7 @@ ir_node *insert_Perm_after(ir_graph *irg, const arch_register_class_t *cls,
        ir_nodeset_t          live;
        ir_nodeset_iterator_t iter;
 
-       ir_node *curr, *irn, *perm, **nodes;
+       ir_node *irn, *perm, **nodes;
        size_t i, n;
 
        DBG((dbg, LEVEL_1, "Insert Perm after: %+F\n", pos));
@@ -116,7 +116,6 @@ ir_node *insert_Perm_after(ir_graph *irg, const arch_register_class_t *cls,
        sched_add_after(pos, perm);
        free(nodes);
 
-       curr = perm;
        for (i = 0; i < n; ++i) {
                ir_node *perm_op = get_irn_n(perm, i);
                const arch_register_t *reg = arch_get_irn_register(perm_op);
@@ -126,8 +125,6 @@ ir_node *insert_Perm_after(ir_graph *irg, const arch_register_class_t *cls,
                ir_node *proj = new_r_Proj(perm, mode, i);
                arch_set_irn_register(proj, reg);
 
-               curr = proj;
-
                be_ssa_construction_init(&senv, irg);
                be_ssa_construction_add_copy(&senv, perm_op);
                be_ssa_construction_add_copy(&senv, proj);
index 07afa5d..e64c25a 100644 (file)
@@ -501,7 +501,6 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
        static const char suffix[] = ".prof";
 
        size_t        i, num_birgs;
-       int           stat_active = 0;
        be_main_env_t env;
        char          prof_filename[256];
        be_irg_t      *birgs;
@@ -567,8 +566,6 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
                num_birgs++;
        }
 
-       stat_active = stat_is_active();
-
        /* For all graphs */
        for (i = 0; i < num_birgs; ++i) {
                be_irg_t *birg = &birgs[i];
index 1813101..bcca214 100644 (file)
@@ -641,7 +641,6 @@ ir_node *be_new_AddSP(const arch_register_t *sp, ir_node *bl, ir_node *old_sp,
 {
        ir_node *irn;
        ir_node *in[n_be_AddSP_last];
-       const arch_register_class_t *cls;
        ir_graph *irg;
        be_node_attr_t *attr;
 
@@ -661,8 +660,6 @@ ir_node *be_new_AddSP(const arch_register_t *sp, ir_node *bl, ir_node *old_sp,
        be_set_constr_single_reg_out(irn, pn_be_AddSP_sp, sp,
                                     arch_register_req_type_produces_sp);
 
-       cls = arch_register_get_class(sp);
-
        return irn;
 }
 
index 0a12e91..74da784 100644 (file)
@@ -663,7 +663,7 @@ static ir_node *heuristic_select(void *block_env, ir_nodeset_t *ns)
        ir_node     *irn, *cand  = NULL;
        int         max_prio     = INT_MIN;
        int         cur_prio     = INT_MIN;
-       int         reg_fact, cand_reg_fact;
+       int         reg_fact;
        ir_nodeset_iterator_t iter;
        /* Note: register pressure calculation needs an overhaul, you need correct
         * tracking for each register class indidually and weight by each class
@@ -706,7 +706,6 @@ static ir_node *heuristic_select(void *block_env, ir_nodeset_t *ns)
                        if (cur_prio > max_prio) {
                                cand          = irn;
                                max_prio      = cur_prio;
-                               cand_reg_fact = reg_fact;
                        }
 
                        DBG((trace_env->dbg, LEVEL_4, "checked NODE %+F\n", irn));
index b3fa6f9..b5a78e1 100644 (file)
@@ -199,15 +199,14 @@ void be_node_needs_frame_entity(be_fec_env_t *env, ir_node *node,
                                 const ir_mode *mode, int align)
 {
        ir_node *spillnode = get_memory_edge(node);
-       spill_t *spill;
 
        assert(spillnode != NULL);
 
        /* walk upwards and collect all phis and spills on this way */
        if (is_Phi(spillnode)) {
-               spill = collect_memphi(env, spillnode, mode, align);
+               collect_memphi(env, spillnode, mode, align);
        } else {
-               spill = collect_spill(env, spillnode, mode, align);
+               collect_spill(env, spillnode, mode, align);
        }
 
        ARR_APP1(ir_node *, env->reloads, node);
index 3835790..7917a4a 100644 (file)
@@ -811,13 +811,11 @@ static void autodetect_arch(void)
        /* We use the cpuid instruction to detect the CPU features */
        if (x86_toogle_cpuid()) {
                cpuid_registers   regs;
-               unsigned          highest_level;
                char              vendorid[13];
                x86_cpu_info_t    cpu_info;
 
                /* get vendor ID */
                x86_cpuid(&regs, 0);
-               highest_level = regs.r.eax;
                memcpy(&vendorid[0], &regs.r.ebx, 4);
                memcpy(&vendorid[4], &regs.r.edx, 4);
                memcpy(&vendorid[8], &regs.r.ecx, 4);
index 2b7d49e..9e9ae9b 100644 (file)
@@ -446,20 +446,12 @@ ir_node *ia32_gen_ASM(ir_node *node)
        const ir_asm_constraint    *in_constraints;
        const ir_asm_constraint    *out_constraints;
        ident                     **clobbers;
-       int                         clobbers_flags = 0;
        unsigned                    clobber_bits[N_IA32_CLASSES];
        int                         out_size;
        backend_info_t             *info;
 
        memset(&clobber_bits, 0, sizeof(clobber_bits));
 
-       /* workaround for lots of buggy code out there as most people think volatile
-        * asm is enough for everything and forget the flags (linux kernel, etc.)
-        */
-       if (get_irn_pinned(node) == op_pin_state_pinned) {
-               clobbers_flags = 1;
-       }
-
        arity = get_irn_arity(node);
        in    = ALLOCANZ(ir_node*, arity);
 
@@ -472,7 +464,6 @@ ir_node *ia32_gen_ASM(ir_node *node)
                if (strcmp(c, "memory") == 0)
                        continue;
                if (strcmp(c, "cc") == 0) {
-                       clobbers_flags = 1;
                        continue;
                }
 
index e840ecc..68407b6 100644 (file)
@@ -1262,11 +1262,6 @@ static void emit_ia32_SwitchJmp(const ir_node *node)
  */
 static void emit_ia32_Jmp(const ir_node *node)
 {
-       ir_node *block;
-
-       /* for now, the code works for scheduled and non-schedules blocks */
-       block = get_nodes_block(node);
-
        /* we have a block schedule */
        if (can_be_fallthrough(node)) {
                ia32_emitf(node, "\t/* fallthrough to %L */\n");
@@ -3370,7 +3365,6 @@ static void bemit_ia32_jcc(const ir_node *node)
        const ir_node        *proj_false;
        const ir_node        *dest_true;
        const ir_node        *dest_false;
-       const ir_node        *block;
 
        cc = determine_final_cc(node, 0, cc);
 
@@ -3381,8 +3375,6 @@ static void bemit_ia32_jcc(const ir_node *node)
        proj_false = get_proj(node, pn_ia32_Jcc_false);
        assert(proj_false && "Jcc without false Proj");
 
-       block = get_nodes_block(node);
-
        if (can_be_fallthrough(proj_true)) {
                /* exchange both proj's so the second one can be omitted */
                const ir_node *t = proj_true;
index 8c7e0ba..2b4b361 100644 (file)
@@ -354,13 +354,11 @@ static void peephole_ia32_Test(ir_node *node)
  */
 static void peephole_ia32_Return(ir_node *node)
 {
-       ir_node *block, *irn;
+       ir_node *irn;
 
        if (!ia32_cg_config.use_pad_return)
                return;
 
-       block = get_nodes_block(node);
-
        /* check if this return is the first on the block */
        sched_foreach_reverse_from(node, irn) {
                switch (get_irn_opcode(irn)) {
@@ -662,7 +660,6 @@ static void peephole_Load_IncSP_to_pop(ir_node *irn)
        int      i, maxslot, inc_ofs, ofs;
        ir_node  *node, *pred_sp, *block;
        ir_node  *loads[MAXPUSH_OPTIMIZE];
-       ir_graph *irg;
        unsigned regmask = 0;
        unsigned copymask = ~0;
 
@@ -772,7 +769,6 @@ static void peephole_Load_IncSP_to_pop(ir_node *irn)
 
        /* create a new IncSP if needed */
        block = get_nodes_block(irn);
-       irg   = get_irn_irg(irn);
        if (inc_ofs > 0) {
                pred_sp = be_new_IncSP(esp, block, pred_sp, -inc_ofs, be_get_IncSP_align(irn));
                sched_add_before(irn, pred_sp);
index cfe3cf5..88b1d51 100755 (executable)
@@ -464,6 +464,7 @@ EOF
 
        if (exists($n->{"init_attr"})) {
                $temp .= "\tattr = (${attr_type}*)get_irn_generic_attr(res);\n";
+               $temp .= "\t(void) attr; /* avoid potential warning */\n";
                $temp .= "\t".$n->{"init_attr"}."\n";
        }
 
index b83d466..36a9863 100644 (file)
@@ -1439,7 +1439,6 @@ static ir_node *get_stack_pointer_for(ir_node *node)
 {
        /* get predecessor in stack_order list */
        ir_node *stack_pred = be_get_stack_pred(abihelper, node);
-       ir_node *stack_pred_transformed;
        ir_node *stack;
 
        if (stack_pred == NULL) {
@@ -1449,8 +1448,8 @@ static ir_node *get_stack_pointer_for(ir_node *node)
                return sp_proj;
        }
 
-       stack_pred_transformed = be_transform_node(stack_pred);
-       stack                  = (ir_node*)pmap_get(node_to_stack, stack_pred);
+       be_transform_node(stack_pred);
+       stack = (ir_node*)pmap_get(node_to_stack, stack_pred);
        if (stack == NULL) {
                return get_stack_pointer_for(stack_pred);
        }
index ccac04a..09fa052 100644 (file)
@@ -605,7 +605,6 @@ int smaller_mode(const ir_mode *sm, const ir_mode *lm)
    and backwards without loss. */
 int values_in_mode(const ir_mode *sm, const ir_mode *lm)
 {
-       int sm_bits, lm_bits;
        ir_mode_arithmetic arith;
 
        assert(sm);
@@ -616,9 +615,6 @@ int values_in_mode(const ir_mode *sm, const ir_mode *lm)
        if (sm == mode_b)
                return mode_is_int(lm);
 
-       sm_bits = get_mode_size_bits(sm);
-       lm_bits = get_mode_size_bits(lm);
-
        arith = get_mode_arithmetic(sm);
        if (arith != get_mode_arithmetic(lm))
                return 0;
index 481f9cd..5e27de9 100644 (file)
@@ -1228,7 +1228,6 @@ static ir_node *equivalent_node_Phi(ir_node *n)
        int i, n_preds;
 
        ir_node *oldn = n;
-       ir_node *block;
        ir_node *first_val = NULL; /* to shutup gcc */
 
        if (!get_opt_optimize() &&
@@ -1237,8 +1236,6 @@ static ir_node *equivalent_node_Phi(ir_node *n)
 
        n_preds = get_Phi_n_preds(n);
 
-       block = get_nodes_block(n);
-
        /* Phi of dead Region without predecessors. */
        if (n_preds == 0)
                return n;
index 758de05..a37bc2f 100644 (file)
@@ -1056,7 +1056,6 @@ void apply_RII(pbqp_t *pbqp)
        unsigned       col_len;
        unsigned       row_index;
        unsigned       row_len;
-       unsigned       node_len;
 
        assert(pbqp_node_get_degree(node) == 2);
 
@@ -1113,7 +1112,6 @@ void apply_RII(pbqp_t *pbqp)
 
        row_len  = src_vec->len;
        col_len  = tgt_vec->len;
-       node_len = node_vec->len;
 
        mat = pbqp_matrix_alloc(pbqp, row_len, col_len);
 
@@ -1232,14 +1230,12 @@ static void select_column(pbqp_edge_t *edge, unsigned col_index)
 static void select_row(pbqp_edge_t *edge, unsigned row_index)
 {
        pbqp_matrix_t  *mat;
-       pbqp_node_t    *src_node;
        pbqp_node_t    *tgt_node;
        vector_t       *tgt_vec;
        unsigned        tgt_len;
        unsigned        tgt_index;
        unsigned        new_infinity = 0;
 
-       src_node = edge->src;
        tgt_node = edge->tgt;
 
        tgt_vec = tgt_node->costs;
index 29e4e0f..d4c6f4d 100644 (file)
@@ -472,7 +472,6 @@ static void transform_allocs(ir_graph *irg, walk_env_t *env)
 static void transform_alloc_calls(ir_graph *irg, walk_env_t *env)
 {
        ir_node *call, *next, *mem, *blk;
-       ir_type *ftp;
 
        /* kill all dead allocs */
        for (call = env->dead_allocs; call; call = next) {
@@ -492,7 +491,6 @@ static void transform_alloc_calls(ir_graph *irg, walk_env_t *env)
        }
 
        /* convert all non-escaped heap allocs into frame variables */
-       ftp = get_irg_frame_type(irg);
        for (call = env->found_allocs; call; call = next) {
                next = (ir_node*)get_irn_link(call);
        }
index 996eb34..e6702a2 100644 (file)
@@ -537,7 +537,7 @@ static void compute_antic(ir_node *block, void *ctx)
 static void insert_nodes(ir_node *block, void *ctx)
 {
        pre_env    *env = (pre_env*)ctx;
-       ir_node    *value, *expr, *idom, *first_s, *worklist;
+       ir_node    *value, *expr, *idom, *first_s;
        block_info *curr_info, *idom_info;
        int        pos, arity = get_irn_arity(block);
        int        all_same, by_some, updated;
@@ -571,7 +571,6 @@ static void insert_nodes(ir_node *block, void *ctx)
 
        /* convert the set into a list. This allows the removal of
         * elements from the set */
-       worklist = NULL;
        foreach_valueset(curr_info->antic_in, value, expr, iter) {
                ir_mode *mode;
 
index c8552d6..6fd5f49 100644 (file)
@@ -1480,7 +1480,10 @@ static unsigned optimize_store(ir_node *store)
 static unsigned optimize_phi(ir_node *phi, walk_env_t *wenv)
 {
        int i, n;
-       ir_node *store, *old_store, *ptr, *block, *phi_block, *phiM, *phiD, *exc, *projM;
+       ir_node *store, *ptr, *block, *phi_block, *phiM, *phiD, *exc, *projM;
+#ifdef DO_CACHEOPT
+       ir_node *old_store;
+#endif
        ir_mode *mode;
        ir_node **inM, **inD, **projMs;
        int *idx;
@@ -1503,7 +1506,9 @@ static unsigned optimize_phi(ir_node *phi, walk_env_t *wenv)
                return 0;
 
        store = skip_Proj(projM);
+#ifdef DO_CACHEOPT
        old_store = store;
+#endif
        if (!is_Store(store))
                return 0;
 
@@ -1814,7 +1819,6 @@ static unsigned hash_cache_entry(const avail_entry_t *entry)
 static void move_loads_out_of_loops(scc *pscc, loop_env *env)
 {
        ir_node   *phi, *load, *next, *other, *next_other;
-       ir_entity *ent;
        int       j;
        phi_entry *phi_list = NULL;
        set       *avail;
@@ -1870,7 +1874,6 @@ static void move_loads_out_of_loops(scc *pscc, loop_env *env)
                        /* for now, we can only move Load(Global) */
                        if (! is_Global(ptr))
                                continue;
-                       ent       = get_Global_entity(ptr);
                        load_mode = get_Load_mode(load);
                        for (other = pscc->head; other != NULL; other = next_other) {
                                node_entry *ne = get_irn_ne(other, env);
index bc7c54e..672e18a 100644 (file)
@@ -1286,7 +1286,6 @@ static void loop_inversion(void)
        int      depth_adaption = opt_params.depth_adaption;
 
        unsigned do_inversion = 1;
-       unsigned has_cc = 0;
 
        /* Depth of 0 is the procedure and 1 a topmost loop. */
        loop_depth = get_loop_depth(cur_loop) - 1;
@@ -1348,7 +1347,7 @@ static void loop_inversion(void)
        /* Search for condition chains and temporarily save the blocks in an array. */
        cc_blocks = NEW_ARR_F(ir_node *, 0);
        inc_irg_visited(current_ir_graph);
-       has_cc = find_condition_chain(loop_head);
+       find_condition_chain(loop_head);
 
        unmark_not_allowed_cc_blocks();
        DEL_ARR_F(cc_blocks);
@@ -2141,7 +2140,7 @@ static unsigned get_unroll_decision_invariant(void)
 {
 
        ir_node   *projres, *loop_condition, *iteration_path;
-       unsigned   success, is_latest_val;
+       unsigned   success;
        ir_tarval *step_tar;
        ir_mode   *mode;
 
@@ -2170,9 +2169,6 @@ static unsigned get_unroll_decision_invariant(void)
         * Until now we only have end_val. */
        if (is_Add(iteration_path) || is_Sub(iteration_path)) {
 
-               /* We test against the latest value of the iv. */
-               is_latest_val = 1;
-
                loop_info.add = iteration_path;
                DB((dbg, LEVEL_4, "Case 1: Got add %N (maybe not sane)\n", loop_info.add));
 
@@ -2199,9 +2195,6 @@ static unsigned get_unroll_decision_invariant(void)
        } else if (is_Phi(iteration_path)) {
                ir_node *new_iteration_phi;
 
-               /* We compare with the value the iv had entering this run. */
-               is_latest_val = 0;
-
                loop_info.iteration_phi = iteration_path;
                DB((dbg, LEVEL_4, "Case 2: Got phi %N\n", loop_info.iteration_phi));
 
index ed3b787..d067a85 100644 (file)
@@ -1098,14 +1098,11 @@ static void check_for_cf_meet(ir_node *block, void *ctx)
        k = 0;
        for (i = n - 1; i >= 0; --i) {
                ir_node *pred = get_Block_cfgpred(block, i);
-               ir_node *pred_block;
 
                /* pred must be a direct jump to us */
                if (! is_Jmp(pred) && ! is_Raise(pred) && !is_Bad(pred))
                        continue;
 
-               pred_block = get_nodes_block(skip_Proj(pred));
-
                preds[k].pred  = pred;
                preds[k].index = i;
        }
index 664d304..2b33df9 100644 (file)
@@ -641,7 +641,6 @@ FIRM_API ir_tarval *computed_value_Cmp_Confirm(const ir_node *cmp, ir_node *left
        ir_relation l_relation, res_relation, neg_relation;
        interval_t  l_iv, r_iv;
        ir_tarval  *tv;
-       ir_mode    *mode;
 
        if (is_Confirm(right)) {
                /* we want the Confirm on the left side */
@@ -722,7 +721,6 @@ FIRM_API ir_tarval *computed_value_Cmp_Confirm(const ir_node *cmp, ir_node *left
                         * We know that a CMP b and check for a ~CMP b
                         */
                        else {
-                               mode    = get_irn_mode(left);
                                neg_relation = get_negated_relation(relation);
 
                                if ((r_relation == neg_relation) || (r_relation == (neg_relation & ~ir_relation_equal))) {
@@ -767,7 +765,6 @@ FIRM_API ir_tarval *computed_value_Cmp_Confirm(const ir_node *cmp, ir_node *left
                 * We know that a CMP b and check for a ~CMP b
                 */
                else {
-                       mode = get_irn_mode(left);
                        neg_relation = get_negated_relation(relation);
 
                        if ((l_relation == neg_relation) || (l_relation == (neg_relation & ~ir_relation_equal))) {
index 1916430..569d9d0 100644 (file)
@@ -608,13 +608,12 @@ static int is_counter_iv(ir_node *iv, iv_env *env)
  */
 static int check_users_for_reg_pressure(ir_node *iv, iv_env *env)
 {
-       ir_node    *irn, *header;
+       ir_node    *irn;
        ir_node    *have_user = NULL;
        ir_node    *have_cmp  = NULL;
        node_entry *e         = get_irn_ne(iv, env);
        scc        *pscc      = e->pscc;
 
-       header = e->header;
        for (irn = pscc->head; irn != NULL; irn = e->next) {
                const ir_edge_t *edge;
 
index f63ae14..0e4141d 100644 (file)
@@ -120,7 +120,6 @@ static void kill_entry(entry_t *entry)
  */
 static void process_call(ir_node *call, ir_entity *callee, q_set *hmap)
 {
-       ir_type *mtp;
        entry_t *key, *entry;
        ir_node *call_param;
        size_t i, n_params;
@@ -131,7 +130,6 @@ static void process_call(ir_node *call, ir_entity *callee, q_set *hmap)
         * last non-variadic one, which might be needed for the va_start()
         * magic
         */
-       mtp = get_Call_type(call);
 
        /* In this for loop we collect the calls, that have
           an constant parameter. */
@@ -412,7 +410,6 @@ static ir_entity *clone_method(const quadruple_t *q)
 {
        ir_entity *new_entity;
        ident *clone_ident;
-       symconst_symbol sym;
        /* A counter for the clones.*/
        static size_t nr = 0;
 
@@ -433,9 +430,6 @@ static ir_entity *clone_method(const quadruple_t *q)
        /* We need now a new ir_graph for our clone method. */
        create_clone_proc_irg(new_entity, q);
 
-       /* We must set the atomic value of our "new_entity". */
-       sym.entity_p = new_entity;
-
        /* The "new_entity" don't have this information. */
        new_entity->attr.mtd_attr.param_access = NULL;
        new_entity->attr.mtd_attr.param_weight = NULL;
index db538d1..cedf85b 100644 (file)
@@ -608,14 +608,12 @@ static void wq_walker(ir_node *n, void *env)
 static void do_reassociation(walker_t *wenv)
 {
        int i, res, changed;
-       ir_node *n, *blk;
+       ir_node *n;
 
        while (! waitq_empty(wenv->wq)) {
                n = (ir_node*)waitq_get(wenv->wq);
                set_irn_link(n, NULL);
 
-               blk = get_nodes_block(n);
-
                hook_reassociate(1);
 
                /* reassociation must run until a fixpoint is reached. */
index fc580fb..35cfa01 100644 (file)
@@ -228,7 +228,6 @@ static void do_opt_tail_rec(ir_graph *irg, tr_env *env)
        if (n_params > 0) {
                ir_node *calls;
                ir_node *args;
-               ir_node *args_bl;
 
                NEW_ARR_A(ir_node **, call_params, env->n_tail_calls);
 
@@ -241,7 +240,6 @@ static void do_opt_tail_rec(ir_graph *irg, tr_env *env)
 
                /* build new Proj's and Phi's */
                args    = get_irg_args(irg);
-               args_bl = get_nodes_block(args);
                for (i = 0; i < n_params; ++i) {
                        ir_mode *mode = get_type_mode(get_method_param_type(method_tp, i));
 
index 0051f86..1b08838 100644 (file)
@@ -486,15 +486,12 @@ void set_atomic_ent_value(ir_entity *entity, ir_node *val)
  *  const_code_irg. */
 int is_irn_const_expression(ir_node *n)
 {
-       ir_mode *m;
-
        /* we are in danger iff an exception will arise. TODO: be more precisely,
         * for instance Div. will NOT rise if divisor != 0
         */
        if (is_binop(n) && !is_fragile_op(n))
                return is_irn_const_expression(get_binop_left(n)) && is_irn_const_expression(get_binop_right(n));
 
-       m = get_irn_mode(n);
        switch (get_irn_opcode(n)) {
        case iro_Const:
        case iro_SymConst:
index f1c7d9c..2bca584 100644 (file)
@@ -55,7 +55,7 @@ static void copy_entities_from_superclass(ir_type *clss, void *env)
        size_t k;
        size_t l;
        int overwritten;
-       ir_type *super, *inhenttype;
+       ir_type *super;
        ir_entity *inhent, *thisent;
        mangle_inherited_name_func *mfunc = *(mangle_inherited_name_func **)env;
 
@@ -64,7 +64,6 @@ static void copy_entities_from_superclass(ir_type *clss, void *env)
                assert(is_Class_type(super) && "not a class");
                for (j = 0; j < get_class_n_members(super); j++) {
                        inhent = get_class_member(super, j);
-                       inhenttype = get_entity_type(inhent);
                        /* check whether inhent is already overwritten */
                        overwritten = 0;
                        for (k = 0; (k < get_class_n_members(clss)) && (overwritten == 0); k++) {