This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] C++ space optimization: de-cloning con/de/structors
- From: Matt Austern <austern at apple dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Stuart Hastings <stuart at apple dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 7 Aug 2002 15:42:45 -0700
- Subject: Re: [PATCH] C++ space optimization: de-cloning con/de/structors
On Wednesday, August 7, 2002, at 03:36 PM, Jason Merrill wrote:
Sorry, I should've just asked this myself. My question wasn't about
static
inlines, but about extern inlines (the default).
The problem, of course, is that we might have an inline (or template)
constructor in multiple translation units; we're required to only have
a single copy after we do the link. Would this conflict in any way
with
giving constructor bodies internal linkage?
It would mean trying to inline the thunk which calls the unified
constructor would be rather complicated. I would think you just
wouldn't
de-clone inline *tors.
Templates shouldn't be a problem; they still have the usual entry
points.
Hm, I don't think I follow that. Templates use vague linkage. If
vague linkage depends on external linkage, then I think that means
that we can't change a decloned template constructor to have internal
(or no) linkage.
I think I must be missing your point.
--Matt