This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Normalize bitmap iteration.
- From: Diego Novillo <dnovillo at google dot com>
- To: Lawrence Crowl <crowl at googlers dot com>
- Cc: Richard Biener <rguenther at suse dot de>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 01 Nov 2012 10:13:20 -0400
- Subject: Re: [patch] Normalize bitmap iteration.
- References: <CAGqM8fYkJHCW0TdVUpO02Qp2fqBfeeZknNkaZYurTpOeXyA0hQ@mail.gmail.com>
On 2012-10-31 13:43 , Lawrence Crowl wrote:
Rename the EXECUTE_IF_SET_IN_SBITMAP macro to EXECUTE_IF_SET_IN_BITMAP. Its
implementation is now identical to that in bitmap.h. To prevent redefinition
errors, both definitions are now guarded by #ifndef. An alternate strategy
is to simply include bitmap.h from sbitmap.h. As this would increase build
time, I have elected to use the #ifndef version. I do not have a strong
preference here.
Me neither. This seems easy enough.
static inline void
-sbitmap_iter_init (sbitmap_iterator *i, const_sbitmap bmp, unsigned int min)
+bmp_iter_set_init (sbitmap_iterator *i, const_sbitmap bmp,
+ unsigned int min, unsigned *bit_no ATTRIBUTE_UNUSED)
So, we'll be changing this again, right? Once we introduce the various
iterator types?
Index: gcc/bitmap.h
===================================================================
--- gcc/bitmap.h (revision 193006)
+++ gcc/bitmap.h (working copy)
@@ -682,10 +682,13 @@ bmp_iter_and_compl (bitmap_iterator *bi,
should be treated as a read-only variable as it contains loop
state. */
+#ifndef EXECUTE_IF_SET_IN_BITMAP
+/* See sbitmap.h for the other definition of EXECUTE_IF_SET_IN_BITMAP. */
Ah... if we could only overload macro defintions ;)
The patch is OK. Thanks.
Diego.