aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2004-10-29 08:41:10 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2004-10-29 08:41:10 +0000
commiteb59b8de04973d3d08bf8df731bbd3da38af918c (patch)
tree5ae5a28c250887e5c6bbcd142331bef3dd27af7d /gcc
parentec7e5618bc8b9d720803a3857eb787983b089318 (diff)
downloadgcc-eb59b8de04973d3d08bf8df731bbd3da38af918c.zip
gcc-eb59b8de04973d3d08bf8df731bbd3da38af918c.tar.gz
gcc-eb59b8de04973d3d08bf8df731bbd3da38af918c.tar.bz2
bitmap.h (bitmap_empty_p): New.
* bitmap.h (bitmap_empty_p): New. (bitmap_and, bitmap_and_into, bitmap_and_compl, bitmap_and_compl_into, bitmap_ior, bitmap_ior_into, bitmap_ior_compl, bitmap_xor, bitmap_xor_into): New bitmap operation macros. (bitmap_ior_and_compl): Rename to ... (bitmap_ior_and_compl_into): ... here. * bitmap.c (bitmap_equal_p): Use bitmap_xor. (bitmap_ior_and_compl): Rename to ... (bitmap_ior_and_compl_into): ... here. Adjust. Return changed flag. (bitmap_union_of_diff): Use renamed bitmap functions. * basic-block.h (AND_REG_SET, AND_COMPL_REG_SET, IOR_REG_SET, XOR_REG_SET, IOR_AND_COMPL_REG_SET): Likewise. * cfgrtl.c (safe_insert_insn_on_edge): Likewise. * df.c (df_bb_rd_local_compute) * flow.c (calculate_global_regs_live, init_propagate_block_info): Likewise. * ifcvt.c (find_if_case_1, find_if_case_2, dead_or_predicable): Likewise. * ra-build.c (union_web_part_roots, livethrough_conflicts_bb, reset_conflicts, conflicts_between_webs): Likewise. * ra-rewrite.c (reloads_to_loads, rewrite_program2, detect_web_parts_to_rebuild): Likewise. * sched-ebb.c (compute_jump_reg_dependencies): Likewise. * tree-int-ssa.c (insert_phi_nodes_for, rewrite_into_ssa): Likewise. * tree-sra.c (decide_instantiations): Likewise. * tree-ssa-alias.c (create_name_tags, merge_pointed_to_info): Likewise. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Likewise. * tree-ssa-loop-im.c (move_computations): Likewise. * tree-ssa-operands.c (get_call_expr_operands): Likewise. * tree-ssa-pre.c (fini_pre): Likewise. * tree-ssa.c (verify_flow_sensitive_alias_info): Likewise. * tree-ssanames.c (any_marked_for_rewrite_p): Likewise. * tree-vectorizer.c (vectorize_loops): Likewise. From-SVN: r89827
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog39
-rw-r--r--gcc/basic-block.h11
-rw-r--r--gcc/bitmap.c16
-rw-r--r--gcc/bitmap.h16
-rw-r--r--gcc/cfgrtl.c3
-rw-r--r--gcc/df.c3
-rw-r--r--gcc/flow.c38
-rw-r--r--gcc/ifcvt.c23
-rw-r--r--gcc/ra-build.c17
-rw-r--r--gcc/ra-rewrite.c14
-rw-r--r--gcc/sched-ebb.c6
-rw-r--r--gcc/tree-into-ssa.c5
-rw-r--r--gcc/tree-sra.c6
-rw-r--r--gcc/tree-ssa-alias.c5
-rw-r--r--gcc/tree-ssa-dom.c4
-rw-r--r--gcc/tree-ssa-loop-im.c2
-rw-r--r--gcc/tree-ssa-operands.c2
-rw-r--r--gcc/tree-ssa-pre.c2
-rw-r--r--gcc/tree-ssa.c3
-rw-r--r--gcc/tree-ssanames.c2
-rw-r--r--gcc/tree-vectorizer.c2
21 files changed, 124 insertions, 95 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8ad6c07..c1e96f3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,42 @@
+2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ * bitmap.h (bitmap_empty_p): New.
+ (bitmap_and, bitmap_and_into, bitmap_and_compl,
+ bitmap_and_compl_into, bitmap_ior, bitmap_ior_into,
+ bitmap_ior_compl, bitmap_xor, bitmap_xor_into): New bitmap
+ operation macros.
+ (bitmap_ior_and_compl): Rename to ...
+ (bitmap_ior_and_compl_into): ... here.
+ * bitmap.c (bitmap_equal_p): Use bitmap_xor.
+ (bitmap_ior_and_compl): Rename to ...
+ (bitmap_ior_and_compl_into): ... here. Adjust. Return changed
+ flag.
+ (bitmap_union_of_diff): Use renamed bitmap functions.
+ * basic-block.h (AND_REG_SET, AND_COMPL_REG_SET, IOR_REG_SET,
+ XOR_REG_SET, IOR_AND_COMPL_REG_SET): Likewise.
+ * cfgrtl.c (safe_insert_insn_on_edge): Likewise.
+ * df.c (df_bb_rd_local_compute)
+ * flow.c (calculate_global_regs_live,
+ init_propagate_block_info): Likewise.
+ * ifcvt.c (find_if_case_1, find_if_case_2,
+ dead_or_predicable): Likewise.
+ * ra-build.c (union_web_part_roots, livethrough_conflicts_bb,
+ reset_conflicts, conflicts_between_webs): Likewise.
+ * ra-rewrite.c (reloads_to_loads, rewrite_program2,
+ detect_web_parts_to_rebuild): Likewise.
+ * sched-ebb.c (compute_jump_reg_dependencies): Likewise.
+ * tree-int-ssa.c (insert_phi_nodes_for, rewrite_into_ssa): Likewise.
+ * tree-sra.c (decide_instantiations): Likewise.
+ * tree-ssa-alias.c (create_name_tags,
+ merge_pointed_to_info): Likewise.
+ * tree-ssa-dom.c (tree_ssa_dominator_optimize): Likewise.
+ * tree-ssa-loop-im.c (move_computations): Likewise.
+ * tree-ssa-operands.c (get_call_expr_operands): Likewise.
+ * tree-ssa-pre.c (fini_pre): Likewise.
+ * tree-ssa.c (verify_flow_sensitive_alias_info): Likewise.
+ * tree-ssanames.c (any_marked_for_rewrite_p): Likewise.
+ * tree-vectorizer.c (vectorize_loops): Likewise.
+
2004-10-29 Nick Clifton <nickc@redhat.com>
config/mn10300/mn10300.h (CONDITIONAL_REGISTER_USAGE): When
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index cb82fe1..4775956 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -50,21 +50,20 @@ typedef bitmap regset;
#define REG_SET_EQUAL_P(A, B) bitmap_equal_p (A, B)
/* `and' a register set with a second register set. */
-#define AND_REG_SET(TO, FROM) bitmap_operation (TO, TO, FROM, BITMAP_AND)
+#define AND_REG_SET(TO, FROM) bitmap_and_into (TO, FROM)
/* `and' the complement of a register set with a register set. */
-#define AND_COMPL_REG_SET(TO, FROM) \
- bitmap_operation (TO, TO, FROM, BITMAP_AND_COMPL)
+#define AND_COMPL_REG_SET(TO, FROM) bitmap_and_compl_into (TO, FROM)
/* Inclusive or a register set with a second register set. */
-#define IOR_REG_SET(TO, FROM) bitmap_operation (TO, TO, FROM, BITMAP_IOR)
+#define IOR_REG_SET(TO, FROM) bitmap_ior_into (TO, FROM)
/* Exclusive or a register set with a second register set. */
-#define XOR_REG_SET(TO, FROM) bitmap_operation (TO, TO, FROM, BITMAP_XOR)
+#define XOR_REG_SET(TO, FROM) bitmap_xor_into (TO, FROM)
/* Or into TO the register set FROM1 `and'ed with the complement of FROM2. */
#define IOR_AND_COMPL_REG_SET(TO, FROM1, FROM2) \
- bitmap_ior_and_compl (TO, FROM1, FROM2)
+ bitmap_ior_and_compl_into (TO, FROM1, FROM2)
/* Clear a single register in a register set. */
#define CLEAR_REGNO_REG_SET(HEAD, REG) bitmap_clear_bit (HEAD, REG)
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index 392ae69..0a50d41 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -672,7 +672,7 @@ bitmap_equal_p (bitmap a, bitmap b)
int ret;
memset (&c, 0, sizeof (c));
- ret = ! bitmap_operation (&c, a, b, BITMAP_XOR);
+ ret = ! bitmap_xor (&c, a, b);
bitmap_clear (&c);
return ret;
@@ -681,17 +681,19 @@ bitmap_equal_p (bitmap a, bitmap b)
/* Or into bitmap TO bitmap FROM1 and'ed with the complement of
bitmap FROM2. */
-void
-bitmap_ior_and_compl (bitmap to, bitmap from1, bitmap from2)
+int
+bitmap_ior_and_compl_into (bitmap to, bitmap from1, bitmap from2)
{
bitmap_head tmp;
+ int changed;
tmp.first = tmp.current = 0;
tmp.using_obstack = 0;
- bitmap_operation (&tmp, from1, from2, BITMAP_AND_COMPL);
- bitmap_operation (to, to, &tmp, BITMAP_IOR);
+ bitmap_and_compl (&tmp, from1, from2);
+ changed = bitmap_ior_into (to, &tmp);
bitmap_clear (&tmp);
+ return changed;
}
int
@@ -703,8 +705,8 @@ bitmap_union_of_diff (bitmap dst, bitmap a, bitmap b, bitmap c)
tmp.first = tmp.current = 0;
tmp.using_obstack = 0;
- bitmap_operation (&tmp, b, c, BITMAP_AND_COMPL);
- changed = bitmap_operation (dst, &tmp, a, BITMAP_IOR);
+ bitmap_and_compl (&tmp, b, c);
+ changed = bitmap_ior (dst, &tmp, a);
bitmap_clear (&tmp);
return changed;
diff --git a/gcc/bitmap.h b/gcc/bitmap.h
index 21e289e..73d5a58 100644
--- a/gcc/bitmap.h
+++ b/gcc/bitmap.h
@@ -87,12 +87,24 @@ extern void bitmap_copy (bitmap, bitmap);
/* True if two bitmaps are identical. */
extern int bitmap_equal_p (bitmap, bitmap);
+#define bitmap_empty_p(MAP) (!(MAP)->first)
+
/* Perform an operation on two bitmaps, yielding a third. */
extern int bitmap_operation (bitmap, bitmap, bitmap, enum bitmap_bits);
+#define bitmap_and(DST,A,B) bitmap_operation (DST,A,B,BITMAP_AND)
+#define bitmap_and_into(DST_SRC,B) bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_AND)
+#define bitmap_and_compl(DST,A,B) bitmap_operation (DST,A,B,BITMAP_AND_COMPL)
+#define bitmap_and_compl_into(DST_SRC,B) bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_AND_COMPL)
+#define bitmap_ior(DST,A,B) bitmap_operation (DST,A,B,BITMAP_IOR)
+#define bitmap_ior_into(DST_SRC,B) bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_IOR)
+#define bitmap_ior_compl(DST,A,B) bitmap_operation (DST,A,B,BITMAP_IOR_COMPL)
+#define bitmap_xor(DST,A,B) bitmap_operation (DST,A,B,BITMAP_XOR)
+#define bitmap_xor_into(DST_SRC,B) bitmap_operation (DST_SRC,DST_SRC,B,BITMAP_XOR)
+
/* `or' into one bitmap the `and' of a second bitmap witih the complement
- of a third. */
-extern void bitmap_ior_and_compl (bitmap, bitmap, bitmap);
+ of a third. Return nonzero if the bitmap changes. */
+extern int bitmap_ior_and_compl_into (bitmap, bitmap, bitmap);
/* Clear a single register in a register set. */
extern void bitmap_clear_bit (bitmap, int);
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 162bdb1..2db93a8 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -1476,8 +1476,7 @@ safe_insert_insn_on_edge (rtx insn, edge e)
for (x = insn; x; x = NEXT_INSN (x))
if (INSN_P (x))
note_stores (PATTERN (x), mark_killed_regs, killed);
- bitmap_operation (killed, killed, e->dest->global_live_at_start,
- BITMAP_AND);
+ bitmap_and_into (killed, e->dest->global_live_at_start);
EXECUTE_IF_SET_IN_REG_SET (killed, 0, regno, rsi)
{
diff --git a/gcc/df.c b/gcc/df.c
index ee10362..818d92e 100644
--- a/gcc/df.c
+++ b/gcc/df.c
@@ -1657,8 +1657,7 @@ df_bb_rd_local_compute (struct df *df, basic_block bb, bitmap call_killed_defs)
if (CALL_P (insn) && (df->flags & DF_HARD_REGS))
{
- bitmap_operation (bb_info->rd_kill, bb_info->rd_kill,
- call_killed_defs, BITMAP_IOR);
+ bitmap_ior_into (bb_info->rd_kill, call_killed_defs);
call_seen = 1;
}
}
diff --git a/gcc/flow.c b/gcc/flow.c
index 4ea30a7..6e599c8 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -1114,11 +1114,9 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
/* ??? Abnormal call edges ignored for the moment, as this gets
confused by sibling call edges, which crashes reg-stack. */
if (e->flags & EDGE_EH)
- {
- bitmap_operation (tmp, sb->global_live_at_start,
- invalidated_by_call, BITMAP_AND_COMPL);
- IOR_REG_SET (new_live_at_end, tmp);
- }
+ bitmap_ior_and_compl_into (new_live_at_end,
+ sb->global_live_at_start,
+ invalidated_by_call);
else
IOR_REG_SET (new_live_at_end, sb->global_live_at_start);
@@ -1188,8 +1186,8 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
precalculated local_live, however with PROP_SCAN_DEAD_CODE
local_live is really dependent on live_at_end. */
CLEAR_REG_SET (tmp);
- rescan = bitmap_operation (tmp, bb->global_live_at_end,
- new_live_at_end, BITMAP_AND_COMPL);
+ rescan = bitmap_and_compl (tmp, bb->global_live_at_end,
+ new_live_at_end);
if (! rescan)
{
@@ -1201,8 +1199,8 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
block. We can miss changes in those sets if we only
compare the new live_at_end against the previous one. */
CLEAR_REG_SET (tmp);
- rescan = bitmap_operation (tmp, new_live_at_end,
- bb->cond_local_set, BITMAP_AND);
+ rescan = bitmap_and (tmp, new_live_at_end,
+ bb->cond_local_set);
}
if (! rescan)
@@ -1210,16 +1208,15 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
/* Find the set of changed bits. Take this opportunity
to notice that this set is empty and early out. */
CLEAR_REG_SET (tmp);
- changed = bitmap_operation (tmp, bb->global_live_at_end,
- new_live_at_end, BITMAP_XOR);
+ changed = bitmap_xor (tmp, bb->global_live_at_end,
+ new_live_at_end);
if (! changed)
continue;
/* If any of the changed bits overlap with local_set,
we'll have to rescan the block. Detect overlap by
the AND with ~local_set turning off bits. */
- rescan = bitmap_operation (tmp, tmp, bb->local_set,
- BITMAP_AND_COMPL);
+ rescan = bitmap_and_compl_into (tmp, bb->local_set);
}
}
@@ -1232,14 +1229,11 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
{
/* Add to live_at_start the set of all registers in
new_live_at_end that aren't in the old live_at_end. */
-
- bitmap_operation (tmp, new_live_at_end, bb->global_live_at_end,
- BITMAP_AND_COMPL);
+
+ changed = bitmap_ior_and_compl_into (bb->global_live_at_start,
+ new_live_at_end,
+ bb->global_live_at_end);
COPY_REG_SET (bb->global_live_at_end, new_live_at_end);
-
- changed = bitmap_operation (bb->global_live_at_start,
- bb->global_live_at_start,
- tmp, BITMAP_IOR);
if (! changed)
continue;
}
@@ -1860,8 +1854,8 @@ init_propagate_block_info (basic_block bb, regset live, regset local_set,
}
/* Compute which register lead different lives in the successors. */
- if (bitmap_operation (diff, bb_true->global_live_at_start,
- bb_false->global_live_at_start, BITMAP_XOR))
+ if (bitmap_xor (diff, bb_true->global_live_at_start,
+ bb_false->global_live_at_start))
{
/* Extract the condition from the branch. */
rtx set_src = SET_SRC (pc_set (BB_END (bb)));
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 709a675..72bb393 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -2914,9 +2914,9 @@ find_if_case_1 (basic_block test_bb, edge then_edge, edge else_edge)
/* Conversion went ok, including moving the insns and fixing up the
jump. Adjust the CFG to match. */
- bitmap_operation (test_bb->global_live_at_end,
- else_bb->global_live_at_start,
- then_bb->global_live_at_end, BITMAP_IOR);
+ bitmap_ior (test_bb->global_live_at_end,
+ else_bb->global_live_at_start,
+ then_bb->global_live_at_end);
new_bb = redirect_edge_and_branch_force (FALLTHRU_EDGE (test_bb), else_bb);
then_bb_index = then_bb->index;
@@ -3018,9 +3018,9 @@ find_if_case_2 (basic_block test_bb, edge then_edge, edge else_edge)
/* Conversion went ok, including moving the insns and fixing up the
jump. Adjust the CFG to match. */
- bitmap_operation (test_bb->global_live_at_end,
- then_bb->global_live_at_start,
- else_bb->global_live_at_end, BITMAP_IOR);
+ bitmap_ior (test_bb->global_live_at_end,
+ then_bb->global_live_at_start,
+ else_bb->global_live_at_end);
delete_basic_block (else_bb);
@@ -3217,14 +3217,13 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb,
TEST_SET & merge_bb->global_live_at_start
are empty. */
- bitmap_operation (tmp, test_set, test_live, BITMAP_IOR);
- bitmap_operation (tmp, tmp, merge_set, BITMAP_AND);
- if (bitmap_first_set_bit (tmp) >= 0)
+ bitmap_ior (tmp, test_set, test_live);
+ bitmap_and_into (tmp, merge_set);
+ if (!bitmap_empty_p (tmp))
fail = 1;
- bitmap_operation (tmp, test_set, merge_bb->global_live_at_start,
- BITMAP_AND);
- if (bitmap_first_set_bit (tmp) >= 0)
+ bitmap_and (tmp, test_set, merge_bb->global_live_at_start);
+ if (!bitmap_empty_p (tmp))
fail = 1;
FREE_REG_SET (tmp);
diff --git a/gcc/ra-build.c b/gcc/ra-build.c
index b66e097..09e6d68 100644
--- a/gcc/ra-build.c
+++ b/gcc/ra-build.c
@@ -503,8 +503,7 @@ union_web_part_roots (struct web_part *r1, struct web_part *r2)
for (cl2 = r2->sub_conflicts; cl2; cl2 = cl2->next)
if (cl1->size_word == cl2->size_word)
{
- bitmap_operation (cl1->conflicts, cl1->conflicts,
- cl2->conflicts, BITMAP_IOR);
+ bitmap_ior_into (cl1->conflicts, cl2->conflicts);
BITMAP_XFREE (cl2->conflicts);
cl2->conflicts = NULL;
}
@@ -1057,7 +1056,7 @@ livethrough_conflicts_bb (basic_block bb)
uses conflict with all defs, and update their other members. */
if (deaths > 0
|| contains_call
- || bitmap_first_set_bit (all_defs) >= 0)
+ || !bitmap_empty_p (all_defs))
{
bitmap_iterator bi;
@@ -1070,7 +1069,7 @@ livethrough_conflicts_bb (basic_block bb)
wp->spanned_deaths += deaths;
wp->crosses_call |= contains_call;
conflicts = get_sub_conflicts (wp, bl);
- bitmap_operation (conflicts, conflicts, all_defs, BITMAP_IOR);
+ bitmap_ior_into (conflicts, all_defs);
}
}
@@ -2076,14 +2075,13 @@ reset_conflicts (void)
/* Useless conflicts will be rebuilt completely. But check
for cleanliness, as the web might have come from the
free list. */
- gcc_assert (bitmap_first_set_bit (web->useless_conflicts) < 0);
+ gcc_assert (bitmap_empty_p (web->useless_conflicts));
}
else
{
/* Useless conflicts with new webs will be rebuilt if they
are still there. */
- bitmap_operation (web->useless_conflicts, web->useless_conflicts,
- newwebs, BITMAP_AND_COMPL);
+ bitmap_and_compl_into (web->useless_conflicts, newwebs);
/* Go through all conflicts, and retain those to old webs. */
for (cl = web->conflict_list; cl; cl = cl->next)
{
@@ -2172,7 +2170,7 @@ conflicts_between_webs (struct df *df)
for (i = 0; i < df->def_id; i++)
if (web_parts[i].ref == NULL)
bitmap_set_bit (ignore_defs, i);
- have_ignored = (bitmap_first_set_bit (ignore_defs) >= 0);
+ have_ignored = !bitmap_empty_p (ignore_defs);
/* Now record all conflicts between webs. Note that we only check
the conflict bitmaps of all defs. Conflict bitmaps are only in
@@ -2200,8 +2198,7 @@ conflicts_between_webs (struct df *df)
bitmap_iterator bi;
if (have_ignored)
- bitmap_operation (cl->conflicts, cl->conflicts, ignore_defs,
- BITMAP_AND_COMPL);
+ bitmap_and_compl_into (cl->conflicts, ignore_defs);
/* We reduce the number of calls to record_conflict() with this
pass thing. record_conflict() itself also has some early-out
optimizations, but here we can use the special properties of
diff --git a/gcc/ra-rewrite.c b/gcc/ra-rewrite.c
index fa00e37..6ebef49 100644
--- a/gcc/ra-rewrite.c
+++ b/gcc/ra-rewrite.c
@@ -1034,8 +1034,7 @@ reloads_to_loads (struct rewrite_info *ri, struct ref **refs,
}
}
if (num_reloads != old_num_r)
- bitmap_operation (ri->need_reload, ri->need_reload, ri->scratch,
- BITMAP_AND_COMPL);
+ bitmap_and_compl_into (ri->need_reload, ri->scratch);
}
}
ri->num_reloads = num_reloads;
@@ -1163,8 +1162,7 @@ rewrite_program2 (bitmap new_deaths)
ri.num_reloads--;
}
}
- bitmap_operation (ri.need_reload, ri.need_reload, ri.scratch,
- BITMAP_AND_COMPL);
+ bitmap_and_compl_into (ri.need_reload, ri.scratch);
last_bb = BLOCK_FOR_INSN (insn);
last_block_insn = insn;
if (!INSN_P (last_block_insn))
@@ -1397,9 +1395,8 @@ rewrite_program2 (bitmap new_deaths)
bitmap_set_bit (ri.scratch, j);
ri.num_reloads--;
}
- }
- bitmap_operation (ri.need_reload, ri.need_reload, ri.scratch,
- BITMAP_AND_COMPL);
+ }
+ bitmap_and_compl_into (ri.need_reload, ri.scratch);
}
ri.need_load = 1;
@@ -1541,8 +1538,7 @@ detect_web_parts_to_rebuild (void)
indeed not become member of it again). */
live_at_end -= 2;
for (i = 0; i < (unsigned int) last_basic_block + 2; i++)
- bitmap_operation (live_at_end[i], live_at_end[i], uses_as_bitmap,
- BITMAP_AND_COMPL);
+ bitmap_and_compl_into (live_at_end[i], uses_as_bitmap);
live_at_end += 2;
if (dump_file && (debug_new_regalloc & DUMP_REBUILD) != 0)
diff --git a/gcc/sched-ebb.c b/gcc/sched-ebb.c
index 286d047..4f97b7c 100644
--- a/gcc/sched-ebb.c
+++ b/gcc/sched-ebb.c
@@ -184,11 +184,9 @@ compute_jump_reg_dependencies (rtx insn, regset cond_set, regset used,
it may guard the fallthrough block from using a value that has
conditionally overwritten that of the main codepath. So we
consider that it restores the value of the main codepath. */
- bitmap_operation (set, e->dest->global_live_at_start, cond_set,
- BITMAP_AND);
+ bitmap_and (set, e->dest->global_live_at_start, cond_set);
else
- bitmap_operation (used, used, e->dest->global_live_at_start,
- BITMAP_IOR);
+ bitmap_ior_into (used, e->dest->global_live_at_start);
}
/* Used in schedule_insns to initialize current_sched_info for scheduling
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index e5dc30b..1ef29ce 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -1056,8 +1056,7 @@ insert_phi_nodes_for (tree var, bitmap *dfs, varray_type *work_stack)
}
/* Remove the blocks where we already have the phis. */
- bitmap_operation (phi_insertion_points, phi_insertion_points,
- def_map->phi_blocks, BITMAP_AND_COMPL);
+ bitmap_and_compl_into (phi_insertion_points, def_map->phi_blocks);
/* Now compute global livein for this variable. Note this modifies
def_map->livein_blocks. */
@@ -1562,7 +1561,7 @@ rewrite_into_ssa (bool all)
/* Initialize the array of variables to rename. */
gcc_assert (vars_to_rename);
- if (bitmap_first_set_bit (vars_to_rename) < 0)
+ if (bitmap_empty_p (vars_to_rename))
{
timevar_pop (TV_TREE_SSA_OTHER);
return;
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 9fd40f9..fb72096 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -1388,10 +1388,8 @@ decide_instantiations (void)
if (cleared_any)
{
- bitmap_operation (sra_candidates, sra_candidates, &done_head,
- BITMAP_AND_COMPL);
- bitmap_operation (needs_copy_in, needs_copy_in, &done_head,
- BITMAP_AND_COMPL);
+ bitmap_and_compl_into (sra_candidates, &done_head);
+ bitmap_and_compl_into (needs_copy_in, &done_head);
}
bitmap_clear (&done_head);
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index bedba4f..c643f8b 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -747,8 +747,7 @@ create_name_tags (struct alias_info *ai)
continue;
}
- if (pi->pt_vars
- && bitmap_first_set_bit (pi->pt_vars) >= 0)
+ if (pi->pt_vars && !bitmap_empty_p (pi->pt_vars))
{
size_t j;
tree old_name_tag = pi->name_mem_tag;
@@ -1733,7 +1732,7 @@ merge_pointed_to_info (struct alias_info *ai, tree dest, tree orig)
if (!dest_pi->pt_anything
&& orig_pi->pt_vars
- && bitmap_first_set_bit (orig_pi->pt_vars) >= 0)
+ && !bitmap_empty_p (orig_pi->pt_vars))
{
if (dest_pi->pt_vars == NULL)
{
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index edd74e0..41102ea 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -356,7 +356,7 @@ tree_ssa_dominator_optimize (void)
interactions between rewriting of _DECL nodes into SSA form
and rewriting SSA_NAME nodes into SSA form after block
duplication and CFG manipulation. */
- if (bitmap_first_set_bit (vars_to_rename) >= 0)
+ if (!bitmap_empty_p (vars_to_rename))
{
rewrite_into_ssa (false);
bitmap_clear (vars_to_rename);
@@ -367,7 +367,7 @@ tree_ssa_dominator_optimize (void)
/* Removal of statements may make some EH edges dead. Purge
such edges from the CFG as needed. */
- if (bitmap_first_set_bit (need_eh_cleanup) >= 0)
+ if (!bitmap_empty_p (need_eh_cleanup))
{
cfg_altered |= tree_purge_all_dead_eh_edges (need_eh_cleanup);
bitmap_zero (need_eh_cleanup);
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index bcdd9d7..93dc8a2 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -679,7 +679,7 @@ move_computations (void)
loop_commit_inserts ();
rewrite_into_ssa (false);
- if (bitmap_first_set_bit (vars_to_rename) >= 0)
+ if (!bitmap_empty_p (vars_to_rename))
{
/* The rewrite of ssa names may cause violation of loop closed ssa
form invariants. TODO -- avoid these rewrites completely.
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index 55cebf2..68acd7c 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -1411,7 +1411,7 @@ get_call_expr_operands (tree stmt, tree expr)
get_expr_operands (stmt, &TREE_OPERAND (expr, 2), opf_none);
- if (bitmap_first_set_bit (call_clobbered_vars) >= 0)
+ if (!bitmap_empty_p (call_clobbered_vars))
{
/* A 'pure' or a 'const' functions never call clobber anything.
A 'noreturn' function might, but since we don't return anyway
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 6a7b620..7f70c84 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -1983,7 +1983,7 @@ fini_pre (void)
free_dominance_info (CDI_POST_DOMINATORS);
vn_delete ();
- if (bitmap_first_set_bit (need_eh_cleanup) >= 0)
+ if (!bitmap_empty_p (need_eh_cleanup))
{
tree_purge_all_dead_eh_edges (need_eh_cleanup);
cleanup_tree_cfg ();
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 6fb711a..1438429 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -470,8 +470,7 @@ verify_flow_sensitive_alias_info (void)
if (pi->name_mem_tag
&& !pi->pt_malloc
- && (pi->pt_vars == NULL
- || bitmap_first_set_bit (pi->pt_vars) < 0))
+ && (pi->pt_vars == NULL || bitmap_empty_p (pi->pt_vars)))
{
error ("Pointers with a memory tag, should have points-to sets or point to malloc");
goto err;
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index 0d8ccf8..c9215f3 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -97,7 +97,7 @@ any_marked_for_rewrite_p (void)
if (!ssa_names_to_rewrite)
return false;
- return bitmap_first_set_bit (ssa_names_to_rewrite) != -1;
+ return !bitmap_empty_p (ssa_names_to_rewrite);
}
/* Mark ssa name VAR for rewriting. */
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
index df16c2c..03dac2d 100644
--- a/gcc/tree-vectorizer.c
+++ b/gcc/tree-vectorizer.c
@@ -5664,7 +5664,7 @@ vectorize_loops (struct loops *loops)
}
rewrite_into_ssa (false);
- if (bitmap_first_set_bit (vars_to_rename) >= 0)
+ if (!bitmap_empty_p (vars_to_rename))
{
/* The rewrite of ssa names may cause violation of loop closed ssa
form invariants. TODO -- avoid these rewrites completely.