This is the mail archive of the
mailing list for the GCC project.
Re: [bitmap] cleanup
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 24 Nov 2004 10:55:11 -0500
- Subject: Re: [bitmap] cleanup
- References: <41A4A813.email@example.com>
On Wed, 2004-11-24 at 10:26, Nathan Sidwell wrote:
> this one's been bothering me, so I decided to fix it.
Almost completely unrelated, but is there a reason we don't have a test
if clear and set bitmap operation? I find I frequently use the idiom:
if (!bitmap_bit_p (map, b))
bitmap_set_bit (map, b);
and it seems like it would be more efficient in these cases to simply
use something like
if (bitmap_test_and_set (map, b))
which would avoid at least the second call to bitmap_find_bit() every
Just curious if I missed something in the past...