From 360e6fe36bae48ed6408bdd61d2a47cd8cf17cb4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20W=C3=BCrdig?= Date: Thu, 19 Apr 2007 15:08:25 +0000 Subject: [PATCH] fixed more signed vs unsigned warnings [r13420] --- ir/be/becopyheur2.c | 12 ++++++------ ir/be/bemain.c | 2 +- ir/be/beprofile.c | 2 +- ir/be/beschedrss.c | 7 ++++--- ir/be/bespillbelady.c | 2 +- ir/be/beuses.c | 4 ++-- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/ir/be/becopyheur2.c b/ir/be/becopyheur2.c index 7f81ef42a..28328db34 100644 --- a/ir/be/becopyheur2.c +++ b/ir/be/becopyheur2.c @@ -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); } } } diff --git a/ir/be/bemain.c b/ir/be/bemain.c index 2c3ab5721..98609ade3 100644 --- a/ir/be/bemain.c +++ b/ir/be/bemain.c @@ -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; diff --git a/ir/be/beprofile.c b/ir/be/beprofile.c index fcffa8d97..6b36cd372 100644 --- a/ir/be/beprofile.c +++ b/ir/be/beprofile.c @@ -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; diff --git a/ir/be/beschedrss.c b/ir/be/beschedrss.c index 7b398f921..5ccf8d625 100644 --- a/ir/be/beschedrss.c +++ b/ir/be/beschedrss.c @@ -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); diff --git a/ir/be/bespillbelady.c b/ir/be/bespillbelady.c index c5e58b727..460b41528 100644 --- a/ir/be/bespillbelady.c +++ b/ir/be/bespillbelady.c @@ -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); diff --git a/ir/be/beuses.c b/ir/be/beuses.c index e6f340e19..5a99e89a9 100644 --- a/ir/be/beuses.c +++ b/ir/be/beuses.c @@ -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; -- 2.20.1