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: [patch] Normalize bitmap iteration.


On 11/1/12, Diego Novillo <dnovillo@google.com> wrote:
> 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?

If you mean C++ style iterators, yes.  If you mean the 'computing'
bitmap iterators, no.

>> 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 ;)

I had the same though.

> The patch is OK.  Thanks.

Okay, I'll merge and commit.

-- 
Lawrence Crowl


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