]> gcc.gnu.org Git - gcc.git/commitdiff
bitmap.c (bitmap_find_bit): Return early if we have the correct element cached.
authorRichard Earnshaw <rearnsha@arm.com>
Tue, 21 May 2002 14:46:01 +0000 (14:46 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Tue, 21 May 2002 14:46:01 +0000 (14:46 +0000)
* bitmap.c (bitmap_find_bit): Return early if we have the correct
element cached.

From-SVN: r53686

gcc/ChangeLog
gcc/bitmap.c

index 6f4a44248ed74e662dd296b5ede40e2213d45f3c..c3d26dc2c1cb9c055e0e0bb14a701422938880a7 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-21  Richard Earnshaw  <rearnsha@arm.com>
+
+       * bitmap.c (bitmap_find_bit): Return early if we have the correct
+       element cached.
+
 Tue May 21 10:51:54 CEST 2002  Jan Hubicka  <jh@suse.cz>
 
        * profile.c (gen_edge_profiler):  Set alias set before the memory is
index b735d1409d0b276069e077ac6e84d1f11eb7f7fb..786689b4ad52d8245a984b591972b10c0f7a8656 100644 (file)
@@ -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;
This page took 0.083303 seconds and 5 git commands to generate.