This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PING: [PATCH gcc/ebitmap] fix for ebitmap_clear_bit()


Ian Lance Taylor wrote:
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


Hi,


Here is a proposition for the ChangeLog entry :

2009-09-22 Nicolas Benoit <nbenoit@tuxfamily.org>

	* ebitmap.c (ebitmap_clear_bit): Fixed map->cacheindex test and
	map>cache update when bit clearing results to an empty element.


I don't know wether the date should correspond to the patch proposal or to the commit date, I let you update it if needed.


Regards,
Nicolas.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]