This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PING: [PATCH gcc/ebitmap] fix for ebitmap_clear_bit()
- From: Nicolas BENOIT <nbenoit at tuxfamily dot org>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Ian Lance Taylor <iant at google dot com>, nicolas dot benoit at cea dot fr, Laurent GUERBY <laurent at guerby dot net>, Richard Guenther <rguenther at suse dot de>, Jakub Jelinek <jakub at redhat dot com>, Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 25 Feb 2010 18:09:49 +0100
- Subject: Re: PING: [PATCH gcc/ebitmap] fix for ebitmap_clear_bit()
- References: <4AAE7972.1020406@tuxfamily.org> <4AB90CDF.8040200@tuxfamily.org> <mcr3a69uw7h.fsf@dhcp-172-17-9-151.mtv.corp.google.com> <4ABF56ED.9080805@tuxfamily.org> <mcrocovqcy4.fsf@dhcp-172-17-9-151.mtv.corp.google.com> <4AD36372.7020100@tuxfamily.org> <4AE9D26B.9000303@tuxfamily.org> <4B8570D9.7090109@tuxfamily.org> <b798aad51002241226i304d7b24n5c5593347e70fec@mail.gmail.com>
On 02/24/2010 09:26 PM, Diego Novillo wrote:
On Wed, Feb 24, 2010 at 13:32, Nicolas BENOIT<nbenoit@tuxfamily.org> wrote:
Hi all,
A while ago, I submitted a few patches for ebitmap.
Two of them have been validated and are still waiting for commit.
http://gcc.gnu.org/ml/gcc-patches/2009-09/msg01921.html
http://gcc.gnu.org/ml/gcc-patches/2009-09/msg01547.html
I will commit them for you. RMs, is this OK at this stage? The
patches were approved long ago, but fell through the cracks for the
final commit.
Thanks. Diego.
Patch http://gcc.gnu.org/ml/gcc-patches/2009-09/msg01547.html
is not applying to trunk since the big whitespace removal, here is an
updated version :
Index: ebitmap.c
===================================================================
--- ebitmap.c (revision 157065)
+++ ebitmap.c (working copy)
@@ -254,8 +254,13 @@
if (!have_eltwordindex)
eltwordindex = sbitmap_popcount (map->wordmask, wordindex);
- if (map->cache != NULL && map->cacheindex == eltwordindex)
- map->cache = NULL;
+ if (map->cache != NULL)
+ {
+ if (map->cacheindex == wordindex)
+ map->cache = NULL;
+ else if (map->cacheindex > wordindex)
+ map->cache = map->cache - 1;
+ }
RESET_BIT (map->wordmask, wordindex);