Jeff Law <l...@redhat.com> wrote: >On 11/14/13 04:04, tsaund...@mozilla.com wrote: >> From: Trevor Saunders <tsaund...@mozilla.com> >> >> 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; >> // do stuff with x >> } >> >> Another advantage of this class is it puts the bitmap_head struct on >the stack >> instead of mallocing it or using a obstack. >> >> I Think the biggest question is if I should make auto_bitmap a full >c++ified >> wrapper around bitmap or if I should contiune just taking the >address of it >> and passing it as a bitmap, but other comments are of course welcome >too. >I'd prefer to see it fully c++ified. > >In response to one of Richi's comments, I spot checked the patch and >only found two occurrences where this lengthened the lifetime of the >bitmap in any significant way. The vast majority of the time any >increase in length was trivial. > >Those instances are in tree-ssa-loop-ivopts.c and the other in >tree-ssa-strlen.c. I don't think you need to change anything for them, > >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. Richard. >jeff