Re: [RFC PATCH] add auto_bitmap

2013-11-15 Thread Trevor Saunders
On Fri, Nov 15, 2013 at 12:11:07PM +0100, Richard Biener wrote: > On Fri, Nov 15, 2013 at 11:37 AM, Trevor Saunders > wrote: > > On Fri, Nov 15, 2013 at 10:56:24AM +0100, Richard Biener wrote: > >> On Thu, Nov 14, 2013 at 10:33 PM, Jeff Law wrote: > >> > On 11/14/13 14:14, Richard Biener wrote:

Re: [RFC PATCH] add auto_bitmap

2013-11-15 Thread Richard Biener
On Fri, Nov 15, 2013 at 11:37 AM, Trevor Saunders wrote: > On Fri, Nov 15, 2013 at 10:56:24AM +0100, Richard Biener wrote: >> On Thu, Nov 14, 2013 at 10:33 PM, Jeff Law wrote: >> > On 11/14/13 14:14, Richard Biener wrote: >> >>> >> >>> >> >>> I'm just pointed out that of all the stuff you changed

Re: [RFC PATCH] add auto_bitmap

2013-11-15 Thread Trevor Saunders
On Fri, Nov 15, 2013 at 10:56:24AM +0100, Richard Biener wrote: > On Thu, Nov 14, 2013 at 10:33 PM, Jeff Law wrote: > > On 11/14/13 14:14, Richard Biener wrote: > >>> > >>> > >>> I'm just pointed out that of all the stuff you changed, these were the > >>> only ones I saw where lifetimes were chang

Re: [RFC PATCH] add auto_bitmap

2013-11-15 Thread Richard Biener
On Thu, Nov 14, 2013 at 10:33 PM, Jeff Law wrote: > On 11/14/13 14:14, Richard Biener wrote: >>> >>> >>> I'm just pointed out that of all the stuff you changed, these were the >>> only ones I saw where lifetimes were changed significantly. >> >> >> I still ask why we need a new type and cannot put

Re: [RFC PATCH] add auto_bitmap

2013-11-14 Thread Trevor Saunders
On Thu, Nov 14, 2013 at 02:33:00PM -0700, Jeff Law wrote: > On 11/14/13 14:14, Richard Biener wrote: > >> > >>I'm just pointed out that of all the stuff you changed, these were the > >>only ones I saw where lifetimes were changed significantly. > > > >I still ask why we need a new type and cannot p

Re: [RFC PATCH] add auto_bitmap

2013-11-14 Thread Jeff Law
On 11/14/13 14:14, Richard Biener wrote: I'm just pointed out that of all the stuff you changed, these were the only ones I saw where lifetimes were changed significantly. I still ask why we need a new type and cannot put this functionality into bitmap_head itself. Given that bitmap is just a

Re: [RFC PATCH] add auto_bitmap

2013-11-14 Thread Richard Biener
Jeff Law wrote: >On 11/14/13 04:04, tsaund...@mozilla.com wrote: >> From: Trevor Saunders >> >> Hi, >> >> this patch adds and starts to use a class auto_bitmap, which is a >very thin >> wrapper around bitmap. Its advantage is that it takes care of >delocation >> automatically. So you can do thi

Re: [RFC PATCH] add auto_bitmap

2013-11-14 Thread Jeff Law
On 11/14/13 07:52, Richard Biener wrote: Another advantage of this class is it puts the bitmap_head struct on the stack instead of mallocing it or using a obstack. Hm, but then eventually you increase the lifetime of the bitmap until the scope closes. Yea, but often that's when we're releasing

Re: [RFC PATCH] add auto_bitmap

2013-11-14 Thread Jeff Law
On 11/14/13 04:04, tsaund...@mozilla.com wrote: From: Trevor Saunders Hi, this patch adds and starts to use a class auto_bitmap, which is a very thin wrapper around bitmap. Its advantage is that it takes care of delocation automatically. So you can do things like int f () { auto_bitmap x

Re: [RFC PATCH] add auto_bitmap

2013-11-14 Thread Michael Matz
Hi, On Thu, 14 Nov 2013, Richard Biener wrote: > Why not give bitmap_head a constructor/destructor and allow auto use of > that. Isn't that exactly what should get 'auto' handling automagically? auto != c++98 :-/ Ciao, Michael.

Re: [RFC PATCH] add auto_bitmap

2013-11-14 Thread Richard Biener
On Thu, Nov 14, 2013 at 12:04 PM, wrote: > From: Trevor Saunders > > Hi, > > this patch adds and starts to use a class auto_bitmap, which is a very thin > wrapper around bitmap. Its advantage is that it takes care of delocation > automatically. So you can do things like > > int > f () > { >