aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog50
-rw-r--r--gcc/bitmap.c2
-rw-r--r--gcc/bt-load.c34
-rw-r--r--gcc/caller-save.c2
-rw-r--r--gcc/cfganal.c2
-rw-r--r--gcc/cfgcleanup.c10
-rw-r--r--gcc/cfgrtl.c3
-rw-r--r--gcc/conflict.c4
-rw-r--r--gcc/ddg.c2
-rw-r--r--gcc/df.c2
-rw-r--r--gcc/except.c2
-rw-r--r--gcc/flow.c16
-rw-r--r--gcc/gcse.c2
-rw-r--r--gcc/global.c4
-rw-r--r--gcc/ifcvt.c2
-rw-r--r--gcc/local-alloc.c3
-rw-r--r--gcc/loop.c2
-rw-r--r--gcc/ra-build.c5
-rw-r--r--gcc/ra-rewrite.c9
-rw-r--r--gcc/reload1.c8
-rw-r--r--gcc/sched-deps.c9
-rw-r--r--gcc/sched-rgn.c2
-rw-r--r--gcc/tree-cfg.c2
-rw-r--r--gcc/tree-dfa.c2
-rw-r--r--gcc/tree-into-ssa.c26
-rw-r--r--gcc/tree-outof-ssa.c19
-rw-r--r--gcc/tree-sra.c4
-rw-r--r--gcc/tree-ssa-alias.c8
-rw-r--r--gcc/tree-ssa-dce.c2
-rw-r--r--gcc/tree-ssa-live.c24
-rw-r--r--gcc/tree-ssa-live.h4
-rw-r--r--gcc/tree-ssa-loop-manip.c2
-rw-r--r--gcc/tree-ssa-operands.c6
-rw-r--r--gcc/tree-ssa-pre.c6
34 files changed, 156 insertions, 124 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d558a92..e2e6032 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,53 @@
+2004-11-04 Nathan Sidwell <nathan@codesourcery.com>
+
+ * bitmap.c (bitmap_print): Make bitno unsigned.
+ * bt-load.c (clear_btr_from_live_range,
+ btr_def_live_range): Likewise.
+ * caller-save.c (save_call_clobbered_regs): Likewise.
+ * cfganal.c (compute_dominance_frontiers_1): Likewise.
+ * cfgcleanup.c (thread_jump): Likewise.
+ * cfgrtl.c (safe_insert_insn_on_edge): Likewise.
+ * conflict.c (conflict_graph_compute): Likewise.
+ * ddg.c (add_deps_for_use): Likewise.
+ * df.c (df_refs_update): Likewise.
+ * except.c (remove_eh_handler): Likewise.
+ * flow.c (verify_local_live_at_start, update_life_info,
+ initialize_uninitialized_subregs, propagate_one_insn,
+ free_propagate_block_info, propagate_block, find_use_as_address,
+ reg_set_to_hard_reg_set): Likewise.
+ * gcse.c (clear_modify_mem_tables): Likewise.
+ * global.c (global_conflicts, build_insn_chain): Likewise.
+ * ifcvt.c (dead_or_predicable): Likewise.
+ * local-alloc.c (update_equiv_regs): Likewise.
+ * loop.c (load_mems): Likewise.
+ * ra-build.c (livethrough_conflicts_bb, conflicts_between_webs):
+ Likewise.
+ * ra-rewrite.c (reloads_to_loads, rewrite_program2, actual_spill):
+ Likewise.
+ * reload1.c (order_regs_for_reload, finish_spills): Likewise.
+ * sched-deps.c (sched_analyze_insn, free_deps): Likewise.
+ * sched-rgn.c (propagate_deps
+ * tree-cfg.c (tree_purge_all_dead_eh_edges): Likewise.
+ * tree-dfa.c (dump_dfa_stats
+ tree-into-ssa.c (compute_global_livein, insert_phi_nodes,
+ insert_phi_nodes_for, debug_def_blocks_r, invalidate_name_tags):
+ Likewise.
+ * tree-outof-ssa.c (coalesce_ssa_name, coalesce_vars,
+ free_temp_expr_table, find_replaceable_exprs): Likewise.
+ * tree-sra.c (scan_function, scalarize_parms): Likewise.
+ * tree-ssa-alias.c (init_alias_info,
+ compute_points_to_and_addr_escape,
+ compute_flow_sensitive_aliasing, maybe_create_global_var): Likewise.
+ * tree-ssa-dce.c (mark_control_dependent_edges_necessary): Likewise.
+ * tree-ssa-live.c (new_tree_live_info, live_worklist,
+ calculate_live_on_entry, calculate_live_on_exit, compare_pairs,
+ sort_coalesce_list, build_tree_conflict_graph, dump_live_info
+ tree-ssa-loop-manip.c (add_exit_phis_var): Likewise.
+ tree-ssa-operands.c (get_asm_expr_operands, add_call_clobber_ops,
+ add_call_read_ops): Likewise.
+ * tree-ssa-pre.c (bitmap_print_value_set, insert_aux): Likewise.
+ * tree-ssa-live.h (num_var_partitions): Return unsigned.
+
2004-11-03 Dorit Naishlos <dorit@il.ibm.com>
PR tree-optimization/18009
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index 57939ff..36acbc4 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -846,7 +846,7 @@ void
bitmap_print (FILE *file, bitmap head, const char *prefix, const char *suffix)
{
const char *comma = "";
- int i;
+ unsigned i;
bitmap_iterator bi;
fputs (prefix, file);
diff --git a/gcc/bt-load.c b/gcc/bt-load.c
index b0ced41..abfe8cd 100644
--- a/gcc/bt-load.c
+++ b/gcc/bt-load.c
@@ -821,7 +821,7 @@ block_at_edge_of_live_range_p (int bb, btr_def def)
static void
clear_btr_from_live_range (btr_def def)
{
- int bb;
+ unsigned bb;
bitmap_iterator bi;
EXECUTE_IF_SET_IN_BITMAP (def->live_range, 0, bb, bi)
@@ -845,7 +845,7 @@ clear_btr_from_live_range (btr_def def)
static void
add_btr_to_live_range (btr_def def)
{
- int bb;
+ unsigned bb;
bitmap_iterator bi;
EXECUTE_IF_SET_IN_BITMAP (def->live_range, 0, bb, bi)
@@ -975,11 +975,9 @@ btr_def_live_range (btr_def def, HARD_REG_SET *btrs_live_in_range)
def->live_range = BITMAP_XMALLOC ();
bitmap_set_bit (def->live_range, def->bb->index);
- if (flag_btr_bb_exclusive)
- COPY_HARD_REG_SET (*btrs_live_in_range, btrs_live[def->bb->index]);
- else
- COPY_HARD_REG_SET (*btrs_live_in_range,
- btrs_live_at_end[def->bb->index]);
+ COPY_HARD_REG_SET (*btrs_live_in_range,
+ (flag_btr_bb_exclusive
+ ? btrs_live : btrs_live_at_end)[def->bb->index]);
for (user = def->uses; user != NULL; user = user->next)
augment_live_range (def->live_range, btrs_live_in_range,
@@ -991,26 +989,16 @@ btr_def_live_range (btr_def def, HARD_REG_SET *btrs_live_in_range)
the set of target registers live over it, because migration
of other PT instructions may have affected it.
*/
- int bb;
- int def_bb = def->bb->index;
+ unsigned bb;
+ unsigned def_bb = flag_btr_bb_exclusive ? -1 : def->bb->index;
bitmap_iterator bi;
CLEAR_HARD_REG_SET (*btrs_live_in_range);
- if (flag_btr_bb_exclusive)
+ EXECUTE_IF_SET_IN_BITMAP (def->live_range, 0, bb, bi)
{
- EXECUTE_IF_SET_IN_BITMAP (def->live_range, 0, bb, bi)
- {
- IOR_HARD_REG_SET (*btrs_live_in_range, btrs_live[bb]);
- }
- }
- else
- {
- EXECUTE_IF_SET_IN_BITMAP (def->live_range, 0, bb, bi)
- {
- IOR_HARD_REG_SET (*btrs_live_in_range,
- (def_bb == bb
- ? btrs_live_at_end : btrs_live) [bb]);
- }
+ IOR_HARD_REG_SET (*btrs_live_in_range,
+ (def_bb == bb
+ ? btrs_live_at_end : btrs_live) [bb]);
}
}
if (!def->other_btr_uses_before_def &&
diff --git a/gcc/caller-save.c b/gcc/caller-save.c
index 55a825e..62873fc 100644
--- a/gcc/caller-save.c
+++ b/gcc/caller-save.c
@@ -408,7 +408,7 @@ save_call_clobbered_regs (void)
if (code == CALL_INSN && ! find_reg_note (insn, REG_NORETURN, NULL))
{
- int regno;
+ unsigned regno;
HARD_REG_SET hard_regs_to_save;
reg_set_iterator rsi;
diff --git a/gcc/cfganal.c b/gcc/cfganal.c
index c76da55..651f153 100644
--- a/gcc/cfganal.c
+++ b/gcc/cfganal.c
@@ -970,7 +970,7 @@ compute_dominance_frontiers_1 (bitmap *frontiers, basic_block bb, sbitmap done)
c;
c = next_dom_son (CDI_DOMINATORS, c))
{
- int x;
+ unsigned x;
bitmap_iterator bi;
EXECUTE_IF_SET_IN_BITMAP (frontiers[c->index], 0, x, bi)
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index f7bf1eb..7f7a07b 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -279,7 +279,7 @@ thread_jump (int mode, edge e, basic_block b)
rtx set1, set2, cond1, cond2, insn;
enum rtx_code code1, code2, reversed_code2;
bool reverse1 = false;
- int i;
+ unsigned i;
regset nonequal;
bool failed = false;
reg_set_iterator rsi;
@@ -348,7 +348,8 @@ thread_jump (int mode, edge e, basic_block b)
cselib_init (false);
/* First process all values computed in the source basic block. */
- for (insn = NEXT_INSN (BB_HEAD (e->src)); insn != NEXT_INSN (BB_END (e->src));
+ for (insn = NEXT_INSN (BB_HEAD (e->src));
+ insn != NEXT_INSN (BB_END (e->src));
insn = NEXT_INSN (insn))
if (INSN_P (insn))
cselib_process_insn (insn);
@@ -360,7 +361,8 @@ thread_jump (int mode, edge e, basic_block b)
processing as if it were same basic block.
Our goal is to prove that whole block is an NOOP. */
- for (insn = NEXT_INSN (BB_HEAD (b)); insn != NEXT_INSN (BB_END (b)) && !failed;
+ for (insn = NEXT_INSN (BB_HEAD (b));
+ insn != NEXT_INSN (BB_END (b)) && !failed;
insn = NEXT_INSN (insn))
{
if (INSN_P (insn))
@@ -369,7 +371,7 @@ thread_jump (int mode, edge e, basic_block b)
if (GET_CODE (pat) == PARALLEL)
{
- for (i = 0; i < XVECLEN (pat, 0); i++)
+ for (i = 0; i < (unsigned)XVECLEN (pat, 0); i++)
failed |= mark_effect (XVECEXP (pat, 0, i), nonequal);
}
else
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 2db93a8..17f7b75 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -1463,7 +1463,8 @@ safe_insert_insn_on_edge (rtx insn, edge e)
regset_head killed_head;
regset killed = INITIALIZE_REG_SET (killed_head);
rtx save_regs = NULL_RTX;
- int regno, noccmode;
+ unsigned regno;
+ int noccmode;
enum machine_mode mode;
reg_set_iterator rsi;
diff --git a/gcc/conflict.c b/gcc/conflict.c
index ca9dd95..ebb4056 100644
--- a/gcc/conflict.c
+++ b/gcc/conflict.c
@@ -439,8 +439,8 @@ conflict_graph_compute (regset regs, partition p)
insn = BB_END (bb);
for (insn = BB_END (bb); insn != head; insn = PREV_INSN (insn))
{
- int born_reg;
- int live_reg;
+ unsigned born_reg;
+ unsigned live_reg;
rtx link;
/* Are we interested in this insn? */
diff --git a/gcc/ddg.c b/gcc/ddg.c
index 4212ac4..aba6347 100644
--- a/gcc/ddg.c
+++ b/gcc/ddg.c
@@ -311,7 +311,7 @@ add_deps_for_use (ddg_ptr g, struct df *df, struct ref *use)
static void
build_inter_loop_deps (ddg_ptr g, struct df *df)
{
- int rd_num, u_num;
+ unsigned rd_num, u_num;
struct bb_info *bb_info;
bitmap_iterator bi;
diff --git a/gcc/df.c b/gcc/df.c
index e479b96..c29274a 100644
--- a/gcc/df.c
+++ b/gcc/df.c
@@ -2238,7 +2238,7 @@ static int
df_refs_update (struct df *df, bitmap blocks)
{
basic_block bb;
- int count = 0, bbno;
+ unsigned count = 0, bbno;
df->n_regs = max_reg_num ();
if (df->n_regs >= df->reg_size)
diff --git a/gcc/except.c b/gcc/except.c
index f6d6dd1..2a2e8da 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -2279,7 +2279,7 @@ remove_eh_handler (struct eh_region *region)
cfun->eh->region_array[region->region_number] = outer;
if (region->aka)
{
- int i;
+ unsigned i;
bitmap_iterator bi;
EXECUTE_IF_SET_IN_BITMAP (region->aka, 0, i, bi)
diff --git a/gcc/flow.c b/gcc/flow.c
index 7c81d69..bcd279a 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -520,7 +520,7 @@ verify_local_live_at_start (regset new_live_at_start, basic_block bb)
}
else
{
- int i;
+ unsigned i;
reg_set_iterator rsi;
/* Find the set of changed registers. */
@@ -570,7 +570,7 @@ update_life_info (sbitmap blocks, enum update_life_extent extent, int prop_flags
{
regset tmp;
regset_head tmp_head;
- int i;
+ unsigned i;
int stabilized_prop_flags = prop_flags;
basic_block bb;
@@ -1352,7 +1352,7 @@ initialize_uninitialized_subregs (void)
{
rtx insn;
edge e;
- int reg, did_something = 0;
+ unsigned reg, did_something = 0;
find_regno_partial_param param;
edge_iterator ei;
@@ -1517,7 +1517,7 @@ propagate_one_insn (struct propagate_block_info *pbi, rtx insn)
int insn_is_dead = 0;
int libcall_is_dead = 0;
rtx note;
- int i;
+ unsigned i;
if (! INSN_P (insn))
return prev;
@@ -1963,7 +1963,7 @@ free_propagate_block_info (struct propagate_block_info *pbi)
if (pbi->flags & PROP_REG_INFO)
{
int num = pbi->insn_num;
- int i;
+ unsigned i;
reg_set_iterator rsi;
EXECUTE_IF_SET_IN_REG_SET (pbi->reg_live, 0, i, rsi)
@@ -2008,7 +2008,7 @@ propagate_block (basic_block bb, regset live, regset local_set,
if (flags & PROP_REG_INFO)
{
- int i;
+ unsigned i;
reg_set_iterator rsi;
/* Process the regs live at the end of the block.
@@ -4135,7 +4135,7 @@ find_use_as_address (rtx x, rtx reg, HOST_WIDE_INT plusconst)
void
dump_regset (regset r, FILE *outf)
{
- int i;
+ unsigned i;
reg_set_iterator rsi;
if (r == NULL)
@@ -4324,7 +4324,7 @@ clear_log_links (sbitmap blocks)
void
reg_set_to_hard_reg_set (HARD_REG_SET *to, bitmap from)
{
- int i;
+ unsigned i;
bitmap_iterator bi;
EXECUTE_IF_SET_IN_BITMAP (from, 0, i, bi)
diff --git a/gcc/gcse.c b/gcc/gcse.c
index f277801..25c53c7 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -2271,7 +2271,7 @@ free_insn_expr_list_list (rtx *listp)
static void
clear_modify_mem_tables (void)
{
- int i;
+ unsigned i;
bitmap_iterator bi;
EXECUTE_IF_SET_IN_BITMAP (modify_mem_list_set, 0, i, bi)
diff --git a/gcc/global.c b/gcc/global.c
index 05dbb62..728914b 100644
--- a/gcc/global.c
+++ b/gcc/global.c
@@ -669,7 +669,7 @@ allocno_compare (const void *v1p, const void *v2p)
static void
global_conflicts (void)
{
- int i;
+ unsigned i;
basic_block b;
rtx insn;
int *block_start_allocnos;
@@ -1816,7 +1816,7 @@ build_insn_chain (rtx first)
if (first == BB_HEAD (b))
{
- int i;
+ unsigned i;
bitmap_iterator bi;
CLEAR_REG_SET (live_relevant_regs);
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index a033f35..5541311 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -3133,7 +3133,7 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb,
regset_head merge_set_head, tmp_head, test_live_head, test_set_head;
regset merge_set, tmp, test_live, test_set;
struct propagate_block_info *pbi;
- int i, fail = 0;
+ unsigned i, fail = 0;
bitmap_iterator bi;
/* Check for no calls or trapping operations. */
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index ebda9dd..42b9838 100644
--- a/gcc/local-alloc.c
+++ b/gcc/local-alloc.c
@@ -1118,7 +1118,8 @@ update_equiv_regs (void)
/* Clear all dead REGNOs from all basic block's live info. */
if (clear_regnos)
{
- int j;
+ unsigned j;
+
if (clear_regnos > 8)
{
FOR_EACH_BB (bb)
diff --git a/gcc/loop.c b/gcc/loop.c
index 08b8529..995df48 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -10929,7 +10929,7 @@ load_mems (const struct loop *loop)
cselib_val *e = cselib_lookup (mem, VOIDmode, 0);
rtx set;
rtx best = mem;
- int j;
+ unsigned j;
struct elt_loc_list *const_equiv = 0;
reg_set_iterator rsi;
diff --git a/gcc/ra-build.c b/gcc/ra-build.c
index 09e6d68..7601a31 100644
--- a/gcc/ra-build.c
+++ b/gcc/ra-build.c
@@ -1022,7 +1022,8 @@ livethrough_conflicts_bb (basic_block bb)
struct ra_bb_info *info = (struct ra_bb_info *) bb->aux;
rtx insn;
bitmap all_defs;
- int first, use_id;
+ int first;
+ unsigned use_id;
unsigned int deaths = 0;
unsigned int contains_call = 0;
@@ -2193,7 +2194,7 @@ conflicts_between_webs (struct df *df)
for (; cl; cl = cl->next)
if (cl->conflicts)
{
- int j;
+ unsigned j;
struct web *web1 = find_subweb_2 (supweb1, cl->size_word);
bitmap_iterator bi;
diff --git a/gcc/ra-rewrite.c b/gcc/ra-rewrite.c
index 6ebef49..2f4ce6c 100644
--- a/gcc/ra-rewrite.c
+++ b/gcc/ra-rewrite.c
@@ -996,7 +996,8 @@ reloads_to_loads (struct rewrite_info *ri, struct ref **refs,
struct web *web = ref2web[DF_REF_ID (refs[n])];
struct web *supweb = find_web_for_subweb (web);
int is_death;
- int j;
+ unsigned j;
+
/* Only emit reloads when entering their interference
region. A use of a spilled web never opens an
interference region, independent of it's color. */
@@ -1062,7 +1063,7 @@ rewrite_program2 (bitmap new_deaths)
{
basic_block last_bb = NULL;
rtx last_block_insn;
- int i, j;
+ unsigned i, j;
bitmap_iterator bi;
if (!INSN_P (insn))
@@ -1355,7 +1356,7 @@ rewrite_program2 (bitmap new_deaths)
CLEAR_HARD_REG_SET (cum_colors);
FOR_EACH_EDGE (e, ei, bb->preds)
{
- int j;
+ unsigned j;
if (num >= 5)
break;
@@ -1629,7 +1630,7 @@ reset_changed_flag (void)
void
actual_spill (void)
{
- int i;
+ unsigned i;
bitmap_iterator bi;
bitmap new_deaths = BITMAP_XMALLOC ();
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 106d547..d70fb29 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -1589,7 +1589,7 @@ count_pseudo (int reg)
static void
order_regs_for_reload (struct insn_chain *chain)
{
- int i;
+ unsigned i;
HARD_REG_SET used_by_pseudos;
HARD_REG_SET used_by_pseudos2;
reg_set_iterator rsi;
@@ -3543,7 +3543,7 @@ finish_spills (int global)
{
struct insn_chain *chain;
int something_changed = 0;
- int i;
+ unsigned i;
reg_set_iterator rsi;
/* Build the spill_regs array for the function. */
@@ -3613,7 +3613,7 @@ finish_spills (int global)
and call retry_global_alloc.
We change spill_pseudos here to only contain pseudos that did not
get a new hard register. */
- for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
+ for (i = FIRST_PSEUDO_REGISTER; i < (unsigned)max_regno; i++)
if (reg_old_renumber[i] != reg_renumber[i])
{
HARD_REG_SET forbidden;
@@ -3661,7 +3661,7 @@ finish_spills (int global)
}
/* Let alter_reg modify the reg rtx's for the modified pseudos. */
- for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++)
+ for (i = FIRST_PSEUDO_REGISTER; i < (unsigned)max_regno; i++)
{
int regno = reg_renumber[i];
if (reg_old_renumber[i] == regno)
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index ef53ea6..ea32c70 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -821,7 +821,7 @@ sched_analyze_insn (struct deps *deps, rtx x, rtx insn, rtx loop_notes)
{
RTX_CODE code = GET_CODE (x);
rtx link;
- int i;
+ unsigned i;
reg_set_iterator rsi;
if (code == COND_EXEC)
@@ -845,8 +845,7 @@ sched_analyze_insn (struct deps *deps, rtx x, rtx insn, rtx loop_notes)
}
else if (code == PARALLEL)
{
- int i;
- for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
+ for (i = XVECLEN (x, 0); i--;)
{
rtx sub = XVECEXP (x, 0, i);
code = GET_CODE (sub);
@@ -1006,7 +1005,7 @@ sched_analyze_insn (struct deps *deps, rtx x, rtx insn, rtx loop_notes)
}
}
- for (i = 0; i < deps->max_reg; i++)
+ for (i = 0; i < (unsigned)deps->max_reg; i++)
{
struct deps_reg *reg_last = &deps->reg_last[i];
reg_last->sets = alloc_INSN_LIST (insn, reg_last->sets);
@@ -1461,7 +1460,7 @@ init_deps (struct deps *deps)
void
free_deps (struct deps *deps)
{
- int i;
+ unsigned i;
reg_set_iterator rsi;
free_INSN_LIST_list (&deps->pending_read_insns);
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index be13519..dcff0b5 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -1986,7 +1986,7 @@ propagate_deps (int bb, struct deps *pred_deps)
FOR_EACH_EDGE (e, ei, block->succs)
{
struct deps *succ_deps;
- int reg;
+ unsigned reg;
reg_set_iterator rsi;
/* Only bbs "below" bb, in the same region, are interesting. */
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index b6d288b..3c8a505 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -5126,7 +5126,7 @@ bool
tree_purge_all_dead_eh_edges (bitmap blocks)
{
bool changed = false;
- size_t i;
+ unsigned i;
bitmap_iterator bi;
EXECUTE_IF_SET_IN_BITMAP (blocks, 0, i, bi)
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c
index de4e225..6dc49a0 100644
--- a/gcc/tree-dfa.c
+++ b/gcc/tree-dfa.c
@@ -688,7 +688,7 @@ dump_dfa_stats (FILE *file)
size = num_referenced_vars * sizeof (tree);
total += size;
- fprintf (file, fmt_str_1, "Referenced variables", num_referenced_vars,
+ fprintf (file, fmt_str_1, "Referenced variables", (unsigned long)num_referenced_vars,
SCALE (size), LABEL (size));
size = dfa_stats.num_stmt_anns * sizeof (struct stmt_ann_d);
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 1ef29ce..10da800 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -230,7 +230,7 @@ void
compute_global_livein (bitmap livein, bitmap def_blocks)
{
basic_block bb, *worklist, *tos;
- int i;
+ unsigned i;
bitmap_iterator bi;
tos = worklist
@@ -603,7 +603,7 @@ void insert_phi_nodes_1 (tree var, bitmap *dfs, varray_type *work_stack)
static void
insert_phi_nodes (bitmap *dfs, bitmap names_to_rename)
{
- size_t i;
+ unsigned i;
varray_type work_stack;
bitmap_iterator bi;
@@ -1005,7 +1005,7 @@ insert_phi_nodes_for (tree var, bitmap *dfs, varray_type *work_stack)
{
struct def_blocks_d *def_map;
bitmap phi_insertion_points;
- int bb_index;
+ unsigned bb_index;
edge e;
tree phi;
basic_block bb;
@@ -1036,7 +1036,7 @@ insert_phi_nodes_for (tree var, bitmap *dfs, varray_type *work_stack)
We now always use fully pruned SSA form. */
while (VARRAY_ACTIVE_SIZE (*work_stack) > 0)
{
- int dfs_index;
+ unsigned dfs_index;
bitmap_iterator bi;
bb = VARRAY_TOP_GENERIC_PTR_NOGC (*work_stack);
@@ -1303,24 +1303,12 @@ debug_def_blocks (void)
static int
debug_def_blocks_r (void **slot, void *data ATTRIBUTE_UNUSED)
{
- unsigned long i;
struct def_blocks_d *db_p = (struct def_blocks_d *) *slot;
- bitmap_iterator bi;
fprintf (stderr, "VAR: ");
print_generic_expr (stderr, db_p->var, dump_flags);
- fprintf (stderr, ", DEF_BLOCKS: { ");
- EXECUTE_IF_SET_IN_BITMAP (db_p->def_blocks, 0, i, bi)
- {
- fprintf (stderr, "%ld ", i);
- }
- fprintf (stderr, "}");
- fprintf (stderr, ", LIVEIN_BLOCKS: { ");
- EXECUTE_IF_SET_IN_BITMAP (db_p->livein_blocks, 0, i, bi)
- {
- fprintf (stderr, "%ld ", i);
- }
- fprintf (stderr, "}\n");
+ bitmap_print (stderr, db_p->def_blocks, ", DEF_BLOCKS: { ", "}");
+ bitmap_print (stderr, db_p->livein_blocks, ", LIVEIN_BLOCKS: { ", "}\n");
return 1;
}
@@ -1382,7 +1370,7 @@ get_def_blocks_for (tree var)
static void
invalidate_name_tags (bitmap vars_to_rename)
{
- size_t i;
+ unsigned i;
bool rename_name_tags_p;
bitmap_iterator bi;
diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c
index 074ca5b..afa05c1 100644
--- a/gcc/tree-outof-ssa.c
+++ b/gcc/tree-outof-ssa.c
@@ -681,7 +681,7 @@ coalesce_abnormal_edges (var_map map, conflict_graph graph, root_var_p rv)
static tree_live_info_p
coalesce_ssa_name (var_map map, int flags)
{
- int num, x, i;
+ unsigned num, x, i;
sbitmap live;
tree var, phi;
root_var_p rv;
@@ -718,7 +718,7 @@ coalesce_ssa_name (var_map map, int flags)
int p = var_to_partition (map, res);
if (p == NO_PARTITION)
continue;
- for (x = 0; x < PHI_NUM_ARGS (phi); x++)
+ for (x = 0; x < (unsigned)PHI_NUM_ARGS (phi); x++)
{
tree arg = PHI_ARG_DEF (phi, x);
int p2;
@@ -1057,7 +1057,7 @@ coalesce_vars (var_map map, tree_live_info_p liveinfo)
basic_block bb;
type_var_p tv;
tree var;
- int x, p, p2;
+ unsigned x, p, p2;
coalesce_list_p cl;
conflict_graph graph;
@@ -1077,26 +1077,27 @@ coalesce_vars (var_map map, tree_live_info_p liveinfo)
FOR_EACH_BB (bb)
{
tree phi, arg;
- int p;
+ unsigned p;
+
for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
p = var_to_partition (map, PHI_RESULT (phi));
/* Skip virtual PHI nodes. */
- if (p == NO_PARTITION)
+ if (p == (unsigned)NO_PARTITION)
continue;
make_live_on_entry (liveinfo, bb, p);
/* Each argument is a potential copy operation. Add any arguments
which are not coalesced to the result to the coalesce list. */
- for (x = 0; x < PHI_NUM_ARGS (phi); x++)
+ for (x = 0; x < (unsigned)PHI_NUM_ARGS (phi); x++)
{
arg = PHI_ARG_DEF (phi, x);
if (!phi_ssa_name_p (arg))
continue;
p2 = var_to_partition (map, arg);
- if (p2 == NO_PARTITION)
+ if (p2 == (unsigned)NO_PARTITION)
continue;
if (p != p2)
add_coalesce (cl, p, p2, 1);
@@ -1278,7 +1279,7 @@ free_temp_expr_table (temp_expr_table_p t)
tree *ret = NULL;
#ifdef ENABLE_CHECKING
- int x;
+ unsigned x;
for (x = 0; x <= num_var_partitions (t->map); x++)
gcc_assert (!t->partition_dep_list[x]);
#endif
@@ -1695,7 +1696,7 @@ static tree *
find_replaceable_exprs (var_map map)
{
basic_block bb;
- int i;
+ unsigned i;
temp_expr_table_p table;
tree *ret;
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index fb72096..561585b 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1018,7 +1018,7 @@ scan_function (void)
if (dump_file && (dump_flags & TDF_DETAILS))
{
- size_t i;
+ unsigned i;
fputs ("\nScan results:\n", dump_file);
EXECUTE_IF_SET_IN_BITMAP (sra_candidates, 0, i, bi)
@@ -1967,7 +1967,7 @@ static void
scalarize_parms (void)
{
tree list = NULL;
- size_t i;
+ unsigned i;
bitmap_iterator bi;
EXECUTE_IF_SET_IN_BITMAP (needs_copy_in, 0, i, bi)
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index c643f8b..87f460a 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -379,7 +379,7 @@ init_alias_info (void)
/* If aliases have been computed before, clear existing information. */
if (aliases_computed_p)
{
- size_t i;
+ unsigned i;
bitmap_iterator bi;
/* Clear the call-clobbered set. We are going to re-discover
@@ -570,7 +570,7 @@ static void
compute_points_to_and_addr_escape (struct alias_info *ai)
{
basic_block bb;
- size_t i;
+ unsigned i;
tree op;
ssa_op_iter iter;
@@ -831,7 +831,7 @@ compute_flow_sensitive_aliasing (struct alias_info *ai)
for (i = 0; i < VARRAY_ACTIVE_SIZE (ai->processed_ptrs); i++)
{
- size_t j;
+ unsigned j;
tree ptr = VARRAY_TREE (ai->processed_ptrs, i);
struct ptr_info_def *pi = SSA_NAME_PTR_INFO (ptr);
var_ann_t v_ann = var_ann (SSA_NAME_VAR (ptr));
@@ -1480,7 +1480,7 @@ setup_pointers_and_addressables (struct alias_info *ai)
static void
maybe_create_global_var (struct alias_info *ai)
{
- size_t i, n_clobbered;
+ unsigned i, n_clobbered;
bitmap_iterator bi;
/* No need to create it, if we have one already. */
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c
index 47038ad..5473354 100644
--- a/gcc/tree-ssa-dce.c
+++ b/gcc/tree-ssa-dce.c
@@ -508,7 +508,7 @@ find_obviously_necessary_stmts (struct edge_list *el)
static void
mark_control_dependent_edges_necessary (basic_block bb, struct edge_list *el)
{
- int edge_number;
+ unsigned edge_number;
gcc_assert (bb != EXIT_BLOCK_PTR);
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c
index 3a6e603..b3f0b78 100644
--- a/gcc/tree-ssa-live.c
+++ b/gcc/tree-ssa-live.c
@@ -433,7 +433,7 @@ static tree_live_info_p
new_tree_live_info (var_map map)
{
tree_live_info_p live;
- int x;
+ unsigned x;
live = (tree_live_info_p) xmalloc (sizeof (struct tree_live_info_d));
live->map = map;
@@ -483,7 +483,7 @@ delete_tree_live_info (tree_live_info_p live)
static void
live_worklist (tree_live_info_p live, varray_type stack, int i)
{
- int b;
+ unsigned b;
tree var;
basic_block def_bb = NULL;
edge e;
@@ -557,7 +557,7 @@ tree_live_info_p
calculate_live_on_entry (var_map map)
{
tree_live_info_p live;
- int i;
+ unsigned i;
basic_block bb;
bitmap saw_def;
tree phi, var, stmt;
@@ -583,7 +583,7 @@ calculate_live_on_entry (var_map map)
for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
{
- for (i = 0; i < PHI_NUM_ARGS (phi); i++)
+ for (i = 0; i < (unsigned)PHI_NUM_ARGS (phi); i++)
{
var = PHI_ARG_DEF (phi, i);
if (!phi_ssa_name_p (var))
@@ -648,7 +648,7 @@ calculate_live_on_entry (var_map map)
int entry_block = e->dest->index;
if (e->dest == EXIT_BLOCK_PTR)
continue;
- for (i = 0; i < num_var_partitions (map); i++)
+ for (i = 0; i < (unsigned)num_var_partitions (map); i++)
{
basic_block tmp;
tree d;
@@ -732,7 +732,7 @@ void
calculate_live_on_exit (tree_live_info_p liveinfo)
{
unsigned b;
- int i, x;
+ unsigned i, x;
bitmap *on_exit;
basic_block bb;
edge e;
@@ -741,14 +741,14 @@ calculate_live_on_exit (tree_live_info_p liveinfo)
var_map map = liveinfo->map;
on_exit = (bitmap *)xmalloc (last_basic_block * sizeof (bitmap));
- for (x = 0; x < last_basic_block; x++)
+ for (x = 0; x < (unsigned)last_basic_block; x++)
on_exit[x] = BITMAP_XMALLOC ();
/* Set all the live-on-exit bits for uses in PHIs. */
FOR_EACH_BB (bb)
{
for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi))
- for (i = 0; i < PHI_NUM_ARGS (phi); i++)
+ for (i = 0; i < (unsigned)PHI_NUM_ARGS (phi); i++)
{
t = PHI_ARG_DEF (phi, i);
e = PHI_ARG_EDGE (phi, i);
@@ -1168,7 +1168,7 @@ int compare_pairs (const void *p1, const void *p2)
void
sort_coalesce_list (coalesce_list_p cl)
{
- int x, num, count;
+ unsigned x, num, count;
partition_pair_p chain, p;
partition_pair_p *list;
@@ -1296,7 +1296,7 @@ build_tree_conflict_graph (tree_live_info_p liveinfo, tpa_p tpa,
conflict_graph graph;
var_map map;
bitmap live;
- int x, y, i;
+ unsigned x, y, i;
basic_block bb;
varray_type partition_link, tpa_to_clear, tpa_nodes;
unsigned l;
@@ -1421,7 +1421,7 @@ build_tree_conflict_graph (tree_live_info_p liveinfo, tpa_p tpa,
EXECUTE_IF_SET_IN_BITMAP (live, 0, x, bi)
{
i = tpa_find_tree (tpa, x);
- if (i != TPA_NONE)
+ if (i != (unsigned)TPA_NONE)
{
int start = VARRAY_INT (tpa_nodes, i);
/* If start is 0, a new root reference list is being started.
@@ -1750,7 +1750,7 @@ void
dump_live_info (FILE *f, tree_live_info_p live, int flag)
{
basic_block bb;
- int i;
+ unsigned i;
var_map map = live->map;
bitmap_iterator bi;
diff --git a/gcc/tree-ssa-live.h b/gcc/tree-ssa-live.h
index 5bba958..c0c1d18 100644
--- a/gcc/tree-ssa-live.h
+++ b/gcc/tree-ssa-live.h
@@ -69,7 +69,7 @@ extern tree make_ssa_temp (tree);
extern void register_ssa_partition_check (tree ssa_var);
#endif
-static inline int num_var_partitions (var_map);
+static inline unsigned num_var_partitions (var_map);
static inline tree var_to_partition_to_var (var_map, tree);
static inline tree partition_to_var (var_map, int);
static inline int var_to_partition (var_map, tree);
@@ -82,7 +82,7 @@ extern var_map create_ssa_var_map (int);
/* Number of partitions in MAP. */
-static inline int
+static inline unsigned
num_var_partitions (var_map map)
{
return map->num_partitions;
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index 6f78757..17267b2 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -152,7 +152,7 @@ static void
add_exit_phis_var (tree var, bitmap livein, bitmap exits)
{
bitmap def;
- int index;
+ unsigned index;
basic_block def_bb = bb_for_stmt (SSA_NAME_DEF_STMT (var));
bitmap_iterator bi;
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index 68acd7c..9161cce 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -1267,7 +1267,7 @@ get_asm_expr_operands (tree stmt)
for (link = ASM_CLOBBERS (stmt); link; link = TREE_CHAIN (link))
if (strcmp (TREE_STRING_POINTER (TREE_VALUE (link)), "memory") == 0)
{
- size_t i;
+ unsigned i;
bitmap_iterator bi;
/* Clobber all call-clobbered variables (or .GLOBAL_VAR if we
@@ -1599,7 +1599,7 @@ add_call_clobber_ops (tree stmt)
add_stmt_operand (&global_var, stmt, opf_is_def);
else
{
- size_t i;
+ unsigned i;
bitmap_iterator bi;
EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i, bi)
@@ -1631,7 +1631,7 @@ add_call_read_ops (tree stmt)
add_stmt_operand (&global_var, stmt, opf_none);
else
{
- size_t i;
+ unsigned i;
EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i, bi)
{
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 7f70c84..91622d3 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -768,7 +768,7 @@ bitmap_print_value_set (FILE *outfile, bitmap_set_t set,
fprintf (outfile, "%s[%d] := { ", setname, blockindex);
if (set)
{
- int i;
+ unsigned i;
bitmap_iterator bi;
EXECUTE_IF_SET_IN_BITMAP (set->expressions, 0, i, bi)
@@ -778,7 +778,7 @@ bitmap_print_value_set (FILE *outfile, bitmap_set_t set,
fprintf (outfile, " (");
print_generic_expr (outfile, get_value_handle (ssa_name (i)), 0);
fprintf (outfile, ") ");
- if (bitmap_last_set_bit (set->expressions) != i)
+ if (bitmap_last_set_bit (set->expressions) != (int)i)
fprintf (outfile, ", ");
}
}
@@ -1415,7 +1415,7 @@ insert_aux (basic_block block)
dom = get_immediate_dominator (CDI_DOMINATORS, block);
if (dom)
{
- int i;
+ unsigned i;
bitmap_iterator bi;
bitmap_set_t newset = NEW_SETS (dom);