Re: How do linkers deal with C++ duplicate code?

dwight@pentasoft.com (Dwight VandenBerghe)
22 Aug 1998 23:27:50 -0400

          From comp.compilers

Related articles
How do linkers deal with C++ duplicate code? johnl@iecc.com (John R Levine) (1998-08-20)
Re: How do linkers deal with C++ duplicate code? johnmce@world.std.com (1998-08-20)
Re: How do linkers deal with C++ duplicate code? stes@mundivia.es (David Stes) (1998-08-20)
Re: How do linkers deal with C++ duplicate code? urs@cs.ucsb.edu (Urs Hoelzle) (1998-08-20)
Re: How do linkers deal with C++ duplicate code? dlmoore@molalla.net (David L Moore) (1998-08-22)
Re: How do linkers deal with C++ duplicate code? dwight@pentasoft.com (1998-08-22)
Re: How do linkers deal with C++ duplicate code? stes@mundivia.es (David Stes) (1998-08-22)
Re: How do linkers deal with C++ duplicate code? saroj@bear.com (1998-08-22)
Re: How do linkers deal with C++ duplicate code? jacob@jacob.remcomp.fr (1998-08-22)
Re: How do linkers deal with C++ duplicate code? ian@cygnus.com (1998-08-22)
Re: How do linkers deal with C++ duplicate code? mrs@kithrup.com (1998-08-22)
Re: How do linkers deal with C++ duplicate code? mrs@kithrup.com (1998-08-22)
[4 later articles]
| List of all articles for this month |
From: dwight@pentasoft.com (Dwight VandenBerghe)
Newsgroups: comp.compilers
Date: 22 Aug 1998 23:27:50 -0400
Organization: Compilers Central
References: 98-08-147
Keywords: C++, linker

On 20 Aug 1998 14:10:17 -0400, John R Levine <johnl@iecc.com> wrote:
>-- Templates and extern inline.


Right - and remember the static copies of inlined functions (in case
someone somewhere else calls one indirect) and the generated default
constructors, copy constructors and assignment operators. And the
vtbl.


> But some systems actually identify and discard the duplicates.


I seem to recall hearing about some work (maybe based on Davidson's
work at Virginia) that kept the compiler output as RTL, then did
interprocedural optimizations on the RTL at link time and tossed out
redundant code blocks there. But it may all have been in a dream ...


Most systems make you do it explicitly, as you know. You tell it when
to generate out the template instantiations. This sucks the big one.


Dwight
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.