aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorLawrence Crowl <crowl@google.com>2012-10-30 00:02:55 +0000
committerLawrence Crowl <crowl@gcc.gnu.org>2012-10-30 00:02:55 +0000
commitf61e445a74b138a2071a0af9f55c2d6e45fe2d5d (patch)
tree1ab800d2373b19aaee52a26a91b2c67b2657101e /gcc/config
parent880661a48b6e2f3f4b3c05860d3c9737b2a1dcc8 (diff)
downloadgcc-f61e445a74b138a2071a0af9f55c2d6e45fe2d5d.zip
gcc-f61e445a74b138a2071a0af9f55c2d6e45fe2d5d.tar.gz
gcc-f61e445a74b138a2071a0af9f55c2d6e45fe2d5d.tar.bz2
This patch implements the unification of the *bitmap interfaces as discussed.
Essentially, we rename ebitmap and sbitmap functions to use the same names as the bitmap functions. This rename works because we can now overload on the bitmap type. Some macros now become inline functions to enable that overloading. The sbitmap non-bool returning bitwise operations have been merged with the bool versions. Sometimes this merge involved modifying the non-bool version to compute the bool value, and sometimes modifying bool version to add additional work from the non-bool version. The redundant routines have been removed. The allocation functions have not been renamed, because we often do not have an argument on which to overload. The cardinality functions have not been renamed, because they have different parameters, and are thus not interchangable. The iteration functions have not been renamed, because they are functionally different. Tested on x86_64, contrib/config-list.mk testing passed. Index: gcc/ChangeLog 2012-10-29 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_copy): Rename bitmap_copy. (sbitmap_copy_n): Rename bitmap_copy_n. (sbitmap_equal): Rename bitmap_equal_p. (sbitmap_empty_p): Rename bitmap_empty_p. (sbitmap_range_empty_p): Rename bitmap_range_empty_p. (sbitmap_zero): Rename bitmap_clear. (sbitmap_ones): Rename bitmap_ones. (sbitmap_vector_zero): Rename bitmap_vector_clear. (sbitmap_vector_ones): Rename bitmap_vector_ones. (sbitmap_not): Rename bitmap_not. (sbitmap_a_and_b_cg): Commented out. (sbitmap_a_and_b): Rename bitmap_and. Add bool return. (sbitmap_difference): Rename bitmap_and_compl. (sbitmap_a_or_b_cg): Commented out. (sbitmap_a_or_b): Rename bitmap_xor. Add bool return. (sbitmap_a_xor_b_cg): Commented out. (sbitmap_a_xor_b): Rename bitmap_xor. Add bool return. (sbitmap_a_and_b_or_c_cg): Rename bitmap_and_or. (sbitmap_a_and_b_or_c): Commented out. (sbitmap_a_or_b_and_c_cg): Rename bitmap_or_and. (sbitmap_a_or_b_and_c): Commented out. (sbitmap_union_of_diff_cg): Rename bitmap_ior_and_compl. (sbitmap_union_of_diff): Commented out. (dump_sbitmap): Rename dump_bitmap. (dump_sbitmap_file): Rename dump_bitmap_file. (debug_sbitmap): Rename debug_bitmap. (dump_sbitmap_vector): Rename dump_bitmap_vector. (sbitmap_first_set_bit): Rename bitmap_first_set_bit. (sbitmap_last_set_bit): Rename bitmap_last_set_bit. (sbitmap_a_subset_b_p): Rename bitmap_subset_p. (sbitmap_any_common_bits): Rename bitmap_intersect_p. (#define sbitmap_free): Reimplement as inline function. (#define sbitmap_vector_free): Reimplement as inline function. * bitmap.h (#define bitmap_zero): Remove as redundant. (#define bitmap_empty_p): Reimplement as inline function. (#define dump_bitmap): Reimplement as inline function. From-SVN: r192969
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/epiphany/resolve-sw-modes.c2
-rw-r--r--gcc/config/i386/i386.c10
-rw-r--r--gcc/config/mips/mips.c2
-rw-r--r--gcc/config/spu/spu.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/gcc/config/epiphany/resolve-sw-modes.c b/gcc/config/epiphany/resolve-sw-modes.c
index 9564d75..14c64d4 100644
--- a/gcc/config/epiphany/resolve-sw-modes.c
+++ b/gcc/config/epiphany/resolve-sw-modes.c
@@ -63,7 +63,7 @@ resolve_sw_modes (void)
todo = VEC_alloc (basic_block, heap, last_basic_block);
pushed = sbitmap_alloc (last_basic_block);
- sbitmap_zero (pushed);
+ bitmap_clear (pushed);
if (!finalize_fp_sets)
{
df_note_add_problem ();
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 6542161..7fbf3a7 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -401,10 +401,10 @@ move_or_delete_vzeroupper (void)
visited = sbitmap_alloc (last_basic_block);
in_worklist = sbitmap_alloc (last_basic_block);
in_pending = sbitmap_alloc (last_basic_block);
- sbitmap_zero (in_worklist);
+ bitmap_clear (in_worklist);
/* Don't check outgoing edges of entry point. */
- sbitmap_ones (in_pending);
+ bitmap_ones (in_pending);
FOR_EACH_BB (bb)
if (BLOCK_INFO (bb)->processed)
RESET_BIT (in_pending, bb->index);
@@ -426,7 +426,7 @@ move_or_delete_vzeroupper (void)
in_pending = in_worklist;
in_worklist = sbitmap_swap;
- sbitmap_zero (visited);
+ bitmap_clear (visited);
cfun->machine->rescan_vzeroupper_p = 0;
@@ -24783,7 +24783,7 @@ core2i7_first_cycle_multipass_issue (void *_data, char *ready_try, int n_ready,
n_ready, 0);
data->ready_try_change_size = n_ready;
}
- sbitmap_zero (data->ready_try_change);
+ bitmap_clear (data->ready_try_change);
/* Filter out insns from ready_try that the core will not be able to issue
on current cycle due to decoder. */
@@ -24802,7 +24802,7 @@ core2i7_first_cycle_multipass_backtrack (const void *_data,
unsigned int i = 0;
sbitmap_iterator sbi;
- gcc_assert (sbitmap_last_set_bit (data->ready_try_change) < n_ready);
+ gcc_assert (bitmap_last_set_bit (data->ready_try_change) < n_ready);
EXECUTE_IF_SET_IN_SBITMAP (data->ready_try_change, 0, i, sbi)
{
ready_try[i] = 0;
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index b867592..cc90e06 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -14828,7 +14828,7 @@ r10k_insert_cache_barriers (void)
/* Bit X of PROTECTED_BBS is set if the last operation in basic block
X is protected by a cache barrier. */
protected_bbs = sbitmap_alloc (last_basic_block);
- sbitmap_zero (protected_bbs);
+ bitmap_clear (protected_bbs);
/* Iterate over the basic blocks in reverse post-order. */
rev_post_order = XNEWVEC (int, last_basic_block);
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index 831d2b0..720cc02 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -2454,7 +2454,7 @@ spu_machine_dependent_reorg (void)
}
blocks = sbitmap_alloc (last_basic_block);
- sbitmap_zero (blocks);
+ bitmap_clear (blocks);
in_spu_reorg = 1;
compute_bb_for_insn ();
@@ -2625,7 +2625,7 @@ spu_machine_dependent_reorg (void)
}
free (spu_bb_info);
- if (!sbitmap_empty_p (blocks))
+ if (!bitmap_empty_p (blocks))
find_many_sub_basic_blocks (blocks);
/* We have to schedule to make sure alignment is ok. */