This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ automatic template instantiation?
- To: gcc at gcc dot gnu dot org, pthomas at suse dot de, tudor dot hulubei at ecora dot com
- Subject: Re: C++ automatic template instantiation?
- From: Mike Stump <mrs at windriver dot com>
- Date: Wed, 19 Apr 2000 20:45:26 -0700 (PDT)
> Date: Wed, 19 Apr 2000 20:22:45 -0400 (EDT)
> From: Tudor Hulubei <tudor.hulubei@ecora.com>
> To: Philipp Thomas <pthomas@suse.de>, gcc@gcc.gnu.org
> I think the size reduction is huge, and it is worth using -frepo to
> get it, it is just that is soooo painful...
Yeah, I expect that. I think I know what causes it too. repo works
by transitive closure, starting with all undefined, and then defining
only those things that in fact _are_ undefined. It is able to gc some
things. The automatic method instantiates anything that appears to be
used, even if it might have been opimized out (as I recall).
You can improve it by using --gc-sections on the link line I bet. I
think this is enough to get it down to the same size, give it a try
and let us know. Also, would be nice to hear the amortized build time
differences for your projects as a percent. (-frepo is 5% faster, %2
slow and 15% faster in apps 1 2 and 3)
Thanks for keeping us honest.