From 9a3823f4e1492e17419d6d6d0de3f1e3f29c251c Mon Sep 17 00:00:00 2001 From: rearnsha Date: Tue, 21 May 2002 14:46:01 +0000 Subject: [PATCH] * 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 --- gcc/ChangeLog | 5 +++++ gcc/bitmap.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6f4a44248ed..c3d26dc2c1c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-05-21 Richard Earnshaw + + * bitmap.c (bitmap_find_bit): Return early if we have the correct + element cached. + Tue May 21 10:51:54 CEST 2002 Jan Hubicka * profile.c (gen_edge_profiler): Set alias set before the memory is 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; -- 2.11.4.GIT