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++
- From: Jan Hubicka <jh at suse dot cz>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Jan Hubicka <jh at suse dot cz>, Devang Patel <dpatel at apple dot com>,Richard Henderson <rth at redhat dot com>, snyder <snyder at fnal dot gov>,"gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 5 Mar 2003 23:14:43 +0100
- Subject: Re: Implementing unit-at-a-time for C++
- References: <20030305173330.GE18675@kam.mff.cuni.cz> <288940000.1046886814@warlock.codesourcery.com>
>
>
> --On Wednesday, March 05, 2003 06:33:30 PM +0100 Jan Hubicka <jh at suse dot cz>
> wrote:
>
> >Any idea how much work would be needed to get this working in the new way?
>
> It wouldn't be that hard.
>
> With -fsyntax-only, you'll see that DECL_NEEDED_P is computed more
> generously. If you use that more generous definition all the time, you'll
> probably get rid of the dependency on what varasm.c decides to emit.
>
> However, you might end up with bigger .o files and slower compile times.
I do have idea of lowering functions. Then I expect all calls to be
explicit call exprs so I can build the CFG and get rid of everything
unreachable.
>
> 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?
>
> Because varasm.c doesn't emit the call, we don't ever generate RTL for
> f<int>.
>
> 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.
Honza
>
> --
> Mark Mitchell mark at codesourcery dot com
> CodeSourcery, LLC http://www.codesourcery.com