This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: empty function optimizations
- To: "'Martin v. Loewis'" <martin at loewis dot home dot cs dot tu-berlin dot de>, "gcc (E-mail)" <gcc at gcc dot gnu dot org>
- Subject: RE: empty function optimizations
- From: Jan Reimers <janr at molienergy dot bc dot ca>
- Date: Wed, 12 Jul 2000 12:49:12 -0700
> -----Original Message-----
> From: Martin v. Loewis [mailto:martin@loewis.home.cs.tu-berlin.de]
> Sent: Wednesday, July 12, 2000 12:03 PM
> To: jbuck@racerx.synopsys.com
> Cc: ken@gesn.com; gcc@gcc.gnu.org
> Subject: Re: empty function optimizations
>
>
> > I agree with you that this is a problem, but believe that
> the appropriate
> > fix isn't in the linker, but is to improve STL instead to
> use partial
> > specialization. The results would be better than you would
> be able to
> > get by trying to use the linker to remove duplicate code.
>
> I personally believe that the right fix is in the compiler, which
> should statically determine that instantiations don't depend on the
> some template parameters, and mangle the function names with a
> wildcard.
Rather, the function should only depend on sizeof(T), which would then be
mangled into the name.
> The tricky part, of course, is to define the exact mechanism for
> determining independence from template parameters.
..determining independence from aspects of the template parameter ***other
than sizeof(T)***.
This technology would go a long way towards countering one of the major
complaints people have with C++, namely code bloat.
JR
>
> Regards,
> Martin
>