diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2002-05-21 14:46:01 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2002-05-21 14:46:01 +0000 |
commit | 279be7c8be548f0f0905ce019632b9f09cf06853 (patch) | |
tree | be6cf18db8bf4a817092717508a0f3e4d6aad649 /gcc/bitmap.c | |
parent | 193a563a8b03fac81c1476ff09534267dce35d80 (diff) | |
download | gcc-279be7c8be548f0f0905ce019632b9f09cf06853.zip gcc-279be7c8be548f0f0905ce019632b9f09cf06853.tar.gz gcc-279be7c8be548f0f0905ce019632b9f09cf06853.tar.bz2 |
bitmap.c (bitmap_find_bit): Return early if we have the correct element cached.
* bitmap.c (bitmap_find_bit): Return early if we have the correct
element cached.
From-SVN: r53686
Diffstat (limited to 'gcc/bitmap.c')
-rw-r--r-- | gcc/bitmap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c index b735d14..786689b 100644 --- a/gcc/bitmap.c +++ b/gcc/bitmap.c @@ -300,8 +300,9 @@ bitmap_find_bit (head, bit) bitmap_element *element; unsigned HOST_WIDE_INT indx = bit / BITMAP_ELEMENT_ALL_BITS; - if (head->current == 0) - return 0; + if (head->current == 0 + || head->indx == indx) + return head->current; if (head->indx > indx) for (element = head->current; |