Commit 377002a9 by Jan Hubicka Committed by Jan Hubicka

bitmap.c (bitmap_elt_insert_after, [...]): Use checking asserts.

	* bitmap.c (bitmap_elt_insert_after, bitmap_first_set_bit,
	bitmap_first_set_bit, bitmap_last_set_bit, bitmap_last_set_bit,
	bitmap_and_into, bitmap_and_compl_into, bitmap_set_range,
	bitmap_compl_and_into, bitmap_elt_ior): Use checking asserts.

From-SVN: r160516
parent 50814135
2010-06-09 Jan Hubicka <jh@suse.cz>
* bitmap.c (bitmap_elt_insert_after, bitmap_first_set_bit,
bitmap_first_set_bit, bitmap_last_set_bit, bitmap_last_set_bit,
bitmap_and_into, bitmap_and_compl_into, bitmap_set_range,
bitmap_compl_and_into, bitmap_elt_ior): Use checking asserts.
2010-06-09 Changpeng Fang <changpeng.fang@amd.com> 2010-06-09 Changpeng Fang <changpeng.fang@amd.com>
* tree-ssa-loop-prefetch.c (gather_memory_references_ref): * tree-ssa-loop-prefetch.c (gather_memory_references_ref):
......
...@@ -499,7 +499,7 @@ bitmap_elt_insert_after (bitmap head, bitmap_element *elt, unsigned int indx) ...@@ -499,7 +499,7 @@ bitmap_elt_insert_after (bitmap head, bitmap_element *elt, unsigned int indx)
} }
else else
{ {
gcc_assert (head->current); gcc_checking_assert (head->current);
node->next = elt->next; node->next = elt->next;
if (node->next) if (node->next)
node->next->prev = node; node->next->prev = node;
...@@ -780,7 +780,7 @@ bitmap_first_set_bit (const_bitmap a) ...@@ -780,7 +780,7 @@ bitmap_first_set_bit (const_bitmap a)
BITMAP_WORD word; BITMAP_WORD word;
unsigned ix; unsigned ix;
gcc_assert (elt); gcc_checking_assert (elt);
bit_no = elt->indx * BITMAP_ELEMENT_ALL_BITS; bit_no = elt->indx * BITMAP_ELEMENT_ALL_BITS;
for (ix = 0; ix != BITMAP_ELEMENT_WORDS; ix++) for (ix = 0; ix != BITMAP_ELEMENT_WORDS; ix++)
{ {
...@@ -815,7 +815,7 @@ bitmap_first_set_bit (const_bitmap a) ...@@ -815,7 +815,7 @@ bitmap_first_set_bit (const_bitmap a)
if (!(word & 0x1)) if (!(word & 0x1))
word >>= 1, bit_no += 1; word >>= 1, bit_no += 1;
gcc_assert (word & 1); gcc_checking_assert (word & 1);
#endif #endif
return bit_no; return bit_no;
} }
...@@ -831,7 +831,7 @@ bitmap_last_set_bit (const_bitmap a) ...@@ -831,7 +831,7 @@ bitmap_last_set_bit (const_bitmap a)
BITMAP_WORD word; BITMAP_WORD word;
int ix; int ix;
gcc_assert (elt); gcc_checking_assert (elt);
while (elt->next) while (elt->next)
elt = elt->next; elt = elt->next;
bit_no = elt->indx * BITMAP_ELEMENT_ALL_BITS; bit_no = elt->indx * BITMAP_ELEMENT_ALL_BITS;
...@@ -869,7 +869,7 @@ bitmap_last_set_bit (const_bitmap a) ...@@ -869,7 +869,7 @@ bitmap_last_set_bit (const_bitmap a)
word >>= 1, bit_no += 1; word >>= 1, bit_no += 1;
#endif #endif
gcc_assert (word & 1); gcc_checking_assert (word & 1);
return bit_no; return bit_no;
} }
...@@ -975,8 +975,8 @@ bitmap_and_into (bitmap a, const_bitmap b) ...@@ -975,8 +975,8 @@ bitmap_and_into (bitmap a, const_bitmap b)
} }
} }
bitmap_elt_clear_from (a, a_elt); bitmap_elt_clear_from (a, a_elt);
gcc_assert (!a->current == !a->first); gcc_assert (!a->current == !a->first
gcc_assert (!a->current || a->indx == a->current->indx); && (!a->current || a->indx == a->current->indx));
} }
...@@ -1175,8 +1175,8 @@ bitmap_and_compl_into (bitmap a, const_bitmap b) ...@@ -1175,8 +1175,8 @@ bitmap_and_compl_into (bitmap a, const_bitmap b)
b_elt = b_elt->next; b_elt = b_elt->next;
} }
} }
gcc_assert (!a->current == !a->first); gcc_assert (!a->current == !a->first
gcc_assert (!a->current || a->indx == a->current->indx); && (!a->current || a->indx == a->current->indx));
return changed != 0; return changed != 0;
} }
...@@ -1207,7 +1207,7 @@ bitmap_set_range (bitmap head, unsigned int start, unsigned int count) ...@@ -1207,7 +1207,7 @@ bitmap_set_range (bitmap head, unsigned int start, unsigned int count)
bitmap_element_link (head, elt); bitmap_element_link (head, elt);
} }
gcc_assert (elt->indx == first_index); gcc_checking_assert (elt->indx == first_index);
elt_prev = elt->prev; elt_prev = elt->prev;
for (i = first_index; i <= last_index; i++) for (i = first_index; i <= last_index; i++)
{ {
...@@ -1470,8 +1470,8 @@ bitmap_compl_and_into (bitmap a, const_bitmap b) ...@@ -1470,8 +1470,8 @@ bitmap_compl_and_into (bitmap a, const_bitmap b)
b_elt = b_elt->next; b_elt = b_elt->next;
} }
} }
gcc_assert (!a->current == !a->first); gcc_assert (!a->current == !a->first
gcc_assert (!a->current || a->indx == a->current->indx); && (!a->current || a->indx == a->current->indx));
return; return;
} }
...@@ -1528,7 +1528,7 @@ bitmap_elt_ior (bitmap dst, bitmap_element *dst_elt, bitmap_element *dst_prev, ...@@ -1528,7 +1528,7 @@ bitmap_elt_ior (bitmap dst, bitmap_element *dst_elt, bitmap_element *dst_prev,
else else
src = b_elt; src = b_elt;
gcc_assert (src); gcc_checking_assert (src);
changed = bitmap_elt_copy (dst, dst_elt, dst_prev, src, changed); changed = bitmap_elt_copy (dst, dst_elt, dst_prev, src, changed);
} }
return changed; return changed;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment