This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples] C++ify gimple.h
On 10/12/07, Aldy Hernandez <aldyh@redhat.com> wrote:
> On Fri, Oct 12, 2007 at 01:50:22PM -0400, Diego Novillo wrote:
> > On 10/12/07, Aldy Hernandez <aldyh@redhat.com> wrote:
> >
> > > * gimple.h (_ALLOC_GSI): New.
> > > Use it throughout when allocating a new gimple_stmt_iterator.
> >
> > Actually, it's much better if we have a static inline gsi_alloc()
> > routine that returns a new iterator.
> >
> > It will be helpful for a future cleanup I have in mind. We are
> > allocating these iterators in GC memory, which may be pretty wasteful.
> > If we have a single allocation point, we can do things like a pool of
> > GSIs in the near future.
>
> I'm on it.
Actually we have the GGC_CNEW macro for this, defined in ggc.h.
Richard.