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: Ian Lance Taylor <iant at google dot com>
- To: Nicolas BENOIT <nbenoit at tuxfamily dot org>
- Cc: gcc-patches at gcc dot gnu dot org, nicolas dot benoit at cea dot fr
- Date: Sat, 26 Sep 2009 16:23:30 -0700
- Subject: Re: PING: [PATCH gcc/ebitmap] fix for ebitmap_clear_bit()
- References: <4AAE7972.1020406@tuxfamily.org> <4AB90CDF.8040200@tuxfamily.org>
Nicolas BENOIT <nbenoit@tuxfamily.org> writes:
> I discovered another issue with the cache reset, this patch fixes both.
>
> Issue 1 : The map->cacheindex compared against eltwordindex, which is
> irrelevant; discussed in the message mentioned above.
>
> Issue 2 : When the cache points to an element which is after the element
> being removed, it is not updated, although all the elements are going to
> be shifted in the array. Then, the cache points to the succeeding
> element it should point to.
>
> This patch fixes both issues :
> 1/ it uses the correct wordindex to compare cacheindex with.
> 2/ it makes the cache points one element backwards if the cached
> element is about to be shifted.
>
> I attached to this message two testcases for each issue.
> The first one is taken from issue 1 initial patch.
>
> By the way, patches
>
> http://gcc.gnu.org/ml/gcc-patches/2009-09/msg00956.html and
> http://gcc.gnu.org/ml/gcc-patches/2009-09/msg00959.html
>
> are still pending. I hope someone will have a look at them.
This patch is OK with a ChangeLog entry.
Thanks.
Ian