This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] C++ space optimization: de-cloning con/de/structors, take IV
On Wed, May 12, 2004 at 01:56:25PM -0700, Matt Austern wrote:
> On May 12, 2004, at 1:29 PM, Jason Merrill wrote:
> >On Wed, 12 May 2004 13:00:06 -0700, Stuart Hastings <email@example.com>
> >>>In my response to your third revision of the patch, I asked about
> >>>the symbols both private and coalesced; obviously if we can't
> >>>duplicates that interferes with the space optimization. What's the
> >>>situation with the symbol names in the current Apple compiler? I
> >>>that the direction discussed at
> >>> http://gcc.gnu.org/ml/gcc-patches/2002-08/msg00629.html
> >>>seemed reasonable.
> >>I inquired with Matt Austern (in the adjacent office :-), and was
> >>told that
> >>nothing had been proposed to the ABI committee.
> >No, not yet. What does the current Apple compiler do?
> A variant of the ABI's scheme for distinguishing between the
> various kinds of constructors and destructors. We use [CD]1
> for in-charge and [CD]2 for not-in-charge as the ABI says,
> and then we use [CD]4 for unified.
> It seemed like the obvious extension. Mark is right, though,
> that gcc shouldn't do something like this without getting
> blessing from the ABI committee.
When I adapted an older version of this patch to 3.3, in addition to
fixing some interactions with dwarf2, I hacked together code to ensure
that the unified *structor was emitted in any translation unit that
might reference it via inlining of the wrappers. I can dig that code
out if anyone wants it (but I don't recommend looking at it :P)
It worked well enough for my purposes, although the constructors tended
to show up twice in a row in GDB backtraces, and various hacks to GDB
were needed to step through the wrapper automatically.