summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevor Saunders <tsaunders@mozilla.com>2014-01-11 21:11:37 -0500
committerTrevor Saunders <tsaunders@mozilla.com>2014-02-18 22:44:38 -0500
commitf23a968f9db7e281762dc8d360f025eed0114ccb (patch)
tree4de5618888b5f0eabcb4173e5772cf8b4916a01e
parent86214b9a050115591b0fe55caa3eb1c2a409f5da (diff)
downloadgcc-f23a968f9db7e281762dc8d360f025eed0114ccb.tar.gz
bitmap_is_single_bit_set_p -> bitmap_head::is_single_bit_set
-rw-r--r--gcc/bitmap.c6
-rw-r--r--gcc/bitmap.h6
-rw-r--r--gcc/tree-ssa-structalias.c2
-rw-r--r--gcc/tree-ssa-tail-merge.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c
index bf2341d4910..2c906833af9 100644
--- a/gcc/bitmap.c
+++ b/gcc/bitmap.c
@@ -758,16 +758,16 @@ bitmap_head::count_bits () const
false. */
bool
-bitmap_single_bit_set_p (const_bitmap a)
+bitmap_head::is_single_bit_set () const
{
unsigned long count = 0;
const bitmap_element *elt;
unsigned ix;
- if (a->is_empty ())
+ if (is_empty ())
return false;
- elt = a->first;
+ elt = first;
/* As there are no completely empty bitmap elements, a second one
means we have more than one bit set. */
if (elt->next != NULL)
diff --git a/gcc/bitmap.h b/gcc/bitmap.h
index b48a58c8aa2..1948889789a 100644
--- a/gcc/bitmap.h
+++ b/gcc/bitmap.h
@@ -211,6 +211,9 @@ struct GTY(()) bitmap_head {
unsigned long count_bits () const;
/* True if the bitmap has only a single bit set. */
+ bool is_single_bit_set () const;
+
+/* True if MAP is an empty bitmap. */
bool is_empty () const { return !first; }
unsigned first_set_bit () const;
@@ -248,9 +251,6 @@ extern bool bitmap_equal_p (const_bitmap, const_bitmap);
AND_COMPL is non-empty). */
extern bool bitmap_intersect_compl_p (const_bitmap, const_bitmap);
-/* True if MAP is an empty bitmap. */
-extern bool bitmap_single_bit_set_p (const_bitmap);
-
/* Boolean operations on bitmaps. The _into variants are two operand
versions that modify the first source operand. The other variants
are three operand versions that to not destroy the source bitmaps.
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 6774fc035ed..a33de70e40d 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -6279,7 +6279,7 @@ pt_solution_singleton_p (struct pt_solution *pt, unsigned *uid)
{
if (pt->anything || pt->nonlocal || pt->escaped || pt->ipa_escaped
|| pt->null || pt->vars == NULL
- || !bitmap_single_bit_set_p (pt->vars))
+ || !pt->vars->is_single_bit_set ())
return false;
*uid = pt->vars->first_set_bit ();
diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c
index 2da8f84ad52..22369cfef1c 100644
--- a/gcc/tree-ssa-tail-merge.c
+++ b/gcc/tree-ssa-tail-merge.c
@@ -815,7 +815,7 @@ same_succ_flush_bb (basic_block bb)
{
same_succ same = BB_SAME_SUCC (bb);
BB_SAME_SUCC (bb) = NULL;
- if (bitmap_single_bit_set_p (same->bbs))
+ if (same->bbs->is_single_bit_set ())
same_succ_htab.remove_elt_with_hash (same, same->hashval);
else
same->bbs->clear_bit (bb->index);