This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Implementing unit-at-a-time for C++
>
> > > The current scheme allows us to avoid presenting the back end with the body
> > > of f<int> in this case:
> > >
> > > g() { if (0) f<int>(); }
> >
> > How does the tree representation of this call look like? Is that
> > ordinary FUNCTION_DECL?
>
> Yes, it's just a CALL_EXPR with a FUNCTION_DECL under it.
>
> > > When the tree optimization stuff is working, we could presumably go to
> > > unit-at-a-time, and get the same results. Until the optimization is
> > > working, we'd end up thinking that the body of f<int> is needed.
> > I guess this is not that major problem. Hope that tree optimizers will
> > enter the game soon.
>
> But I think that it's inappropriate to make your changes (or at least
> enable them by default) until it happens.
OK, I will try to implement them and not enable by default then and lets
see how the code will look like.
Honza
>
> --
> Mark Mitchell
> CodeSourcery, LLC
> mark at codesourcery dot com