diff options
author | rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-21 14:46:01 +0000 |
---|---|---|
committer | rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-21 14:46:01 +0000 |
commit | 9a3823f4e1492e17419d6d6d0de3f1e3f29c251c (patch) | |
tree | be6cf18db8bf4a817092717508a0f3e4d6aad649 /gcc/bitmap.c | |
parent | 4c45e0187f86c0285c3c73c68a405698998018b8 (diff) | |
download | gcc-9a3823f4e1492e17419d6d6d0de3f1e3f29c251c.tar.gz |
* bitmap.c (bitmap_find_bit): Return early if we have the correct
element cached.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53686 138bc75d-0d04-0410-961f-82ee72b054a4
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 b735d1409d0..786689b4ad5 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; |