This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Implementing unit-at-a-time for C++


> 
> 
> --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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]