This is the mail archive of the
mailing list for the GCC project.
Re: [RFC PATCH] add auto_bitmap
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jeff Law <law at redhat dot com>,tsaunders at mozilla dot com,gcc-patches at gcc dot gnu dot org
- Date: Thu, 14 Nov 2013 22:14:20 +0100
- Subject: Re: [RFC PATCH] add auto_bitmap
- Authentication-results: sourceware.org; auth=none
- References: <1384427080-13613-1-git-send-email-tsaunders at mozilla dot com> <5285342D dot 3050505 at redhat dot com>
Jeff Law <email@example.com> wrote:
>On 11/14/13 04:04, firstname.lastname@example.org wrote:
>> From: Trevor Saunders <email@example.com>
>> this patch adds and starts to use a class auto_bitmap, which is a
>> wrapper around bitmap. Its advantage is that it takes care of
>> automatically. So you can do things like
>> f ()
>> auto_bitmap x;
>> // do stuff with x
>> Another advantage of this class is it puts the bitmap_head struct on
>> instead of mallocing it or using a obstack.
>> I Think the biggest question is if I should make auto_bitmap a full
>> 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
>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.