fixed more signed vs unsigned warnings
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Thu, 19 Apr 2007 15:08:25 +0000 (15:08 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Thu, 19 Apr 2007 15:08:25 +0000 (15:08 +0000)
[r13420]

ir/be/becopyheur2.c
ir/be/bemain.c
ir/be/beprofile.c
ir/be/beschedrss.c
ir/be/bespillbelady.c
ir/be/beuses.c

index 7f81ef4..28328db 100644 (file)
@@ -290,15 +290,15 @@ static void incur_constraint_costs(co2_t *env, ir_node *irn, col_cost_pair_t *co
 
        req = arch_get_register_req(env->co->aenv, irn, BE_OUT_POS(0));
 
-       if(arch_register_req_is(req, limited)) {
-               unsigned n_regs = env->co->cls->n_regs;
+       if (arch_register_req_is(req, limited)) {
+               unsigned n_regs   = env->co->cls->n_regs;
                unsigned n_constr = 0;
-               int i;
+               unsigned i;
 
                n_constr = rbitset_popcnt(req->limited, n_regs);
-               for(i = 0; i < n_regs; ++i) {
-                       if(rbitset_is_set(req->limited, i)) {
-                               col_costs[i].costs  = add_saturated(col_costs[i].costs, costs / n_constr);
+               for (i = 0; i < n_regs; ++i) {
+                       if (rbitset_is_set(req->limited, i)) {
+                               col_costs[i].costs = add_saturated(col_costs[i].costs, costs / n_constr);
                        }
                }
        }
index 2c3ab57..98609ad 100644 (file)
@@ -348,7 +348,7 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
        char prof_filename[256];
        static const char suffix[] = ".prof";
        be_irg_t *birgs;
-       unsigned num_birgs;
+       int num_birgs;
        ir_graph **irg_list, **backend_irg_list;
 
        lc_timer_t *t_abi      = NULL;
index fcffa8d..6b36cd3 100644 (file)
@@ -308,7 +308,7 @@ ir_graph *
 be_profile_instrument(const char *filename, unsigned flags)
 {
        int n, i;
-       unsigned int n_blocks = 0;
+       int n_blocks = 0;
        ir_entity *bblock_id;
        ir_entity *bblock_counts;
        ir_entity *ent_filename;
index 7b398f9..5ccf8d6 100644 (file)
@@ -1825,8 +1825,9 @@ static serialization_t *compute_best_admissible_serialization(rss_t *rss, ir_nod
                                */
 
                                if (add_edge) {
-                                       int vv_height = get_irn_height(rss->h, vv_irn);
-                                       int mu1, mu2, critical_path_cost;
+                                       unsigned vv_height = get_irn_height(rss->h, vv_irn);
+                                       unsigned critical_path_cost;
+                                       unsigned mu1, mu2;
 
                                        /*
                                                mu1 = | descendants(v) cut sat_vals |
@@ -1930,7 +1931,7 @@ static serialization_t *compute_best_admissible_serialization(rss_t *rss, ir_nod
 static void perform_value_serialization_heuristic(rss_t *rss) {
        bitset_t *arch_nonign_bs = bitset_alloca(arch_register_class_n_regs(rss->cls));
        bitset_t *abi_ign_bs     = bitset_alloca(arch_register_class_n_regs(rss->cls));
-       int      available_regs, iteration;
+       unsigned available_regs, iteration;
        dvg_t    dvg;
        ir_nodeset_t *sat_vals;
        pset *ser_set = new_pset(cmp_rss_edges, 20);
index c5e58b7..460b415 100644 (file)
@@ -445,7 +445,7 @@ static void compute_live_ins(ir_node *block, void *data) {
        }
 
        pressure            = be_get_loop_pressure(env->loop_ana, env->cls, loop);
-       assert(ARR_LEN(delayed) <= pressure);
+       assert(ARR_LEN(delayed) <= (signed)pressure);
        free_slots          = env->n_regs - ARR_LEN(starters);
        free_pressure_slots = env->n_regs - (pressure - ARR_LEN(delayed));
        free_slots          = MIN(free_slots, free_pressure_slots);
index e6f340e..5a99e89 100644 (file)
@@ -219,7 +219,7 @@ static be_next_use_t get_next_use(be_uses_t *env, ir_node *from,
                const be_use_t *use;
                const ir_node *succ_block = get_edge_src_irn(edge);
                ir_loop *succ_loop;
-               int use_dist;
+               unsigned use_dist;
 
                if(succ_block == startblock)
                        continue;
@@ -246,7 +246,7 @@ static be_next_use_t get_next_use(be_uses_t *env, ir_node *from,
 
                succ_loop = get_irn_loop(succ_block);
                if(get_loop_depth(succ_loop) < loopdepth) {
-                       int factor = (loopdepth - get_loop_depth(succ_loop)) * 5000;
+                       unsigned factor = (loopdepth - get_loop_depth(succ_loop)) * 5000;
                        DBG((env->dbg, LEVEL_5, "Increase usestep because of loop out edge %d -> %d (%u)\n", factor));
                        // TODO we should use the number of nodes in the loop or so...
                        use_dist += factor;