public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org
Subject: Re: [C++ PATCH] Optimize C++ comdat ctors/dtors in classes without virtual bases (PR c++/3187, take 3)
Date: Tue, 01 Dec 2009 08:07:00 -0000	[thread overview]
Message-ID: <20091201074526.GP22813@hs20-bc2-1.build.redhat.com> (raw)
In-Reply-To: <4B149197.4040304@redhat.com>

On Mon, Nov 30, 2009 at 10:46:31PM -0500, Jason Merrill wrote:
> On 11/30/2009 05:36 PM, Jakub Jelinek wrote:
> >	* config/abi/pre/gnu.ver: Don't export certain base dtors that
> >	weren't previously exported.
> 
> Is this necessary?  I thought it was OK to add new exported symbols, but 
> you'd know better than I.

Yes.  We definitely must not export them with the old symbol versions where
they have not been exported before (GLIBCXX_3.4 and GLIBCXX_3.4.10).
We could export them at @@GLIBCXX_3.4.14 (which would mean the same gnu.ver
changes and mentioning the D2 symbols in GLIBCXX_3.4.14 section), but that
has a problem that we only emit those D2 symbols when HAVE_COMDAT_GROUP, so
in !HAVE_COMDAT_GROUP configurations the exported list would be different.
I have no idea how to force generation of those symbols otherwise so that
they are exported on all targets.

> 
> >+	  && (SUPPORTS_ONE_ONLY || !DECL_WEAK (fns[0]))
> 
> This test seems unnecessary; I don't see the problem with using aliases 
> on targets with weak symbols but no one-only support.

This is to fix AIX (and is actually unrelated to this patch, it can be dealt
with separately).  In theory it should work well, but David Edelsohn
reported that some symbols were missing from libstdc++.so without it.  I
have no access to AIX and have no idea what AIX linker is doing with the
symbols.  !SUPPORTS_ONE_ONLY targets don't have DECL_ONE_ONLY, but instead
just use DECL_WEAK symbols, so I thought when we don't do this optimization
on !HAVE_COMDAT_GROUP SUPPORTS_ONE_ONLY targets for comdat and comdat-like
symbols, the world wouldn't end if we didn't support it even on the
far rarer !HAVE_COMDAT_GROUP !SUPPORTS_ONE_ONLY targets.

	Jakub

  reply	other threads:[~2009-12-01  7:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-30 22:38 Jakub Jelinek
2009-12-01  3:53 ` Jason Merrill
2009-12-01  8:07   ` Jakub Jelinek [this message]
2009-12-01 15:39     ` Jason Merrill
2009-12-01  9:52 ` [C++ PATCH] Optimize C++ comdat ctors/dtors in classes without virtual bases (PR c++/3187, take 4) Jakub Jelinek
2009-12-01 15:40   ` Jakub Jelinek
2009-12-01 16:38     ` Dave Korn
2009-12-01 19:35   ` [C++ PATCH] Optimize C++ comdat ctors/dtors in classes without virtual bases (PR c++/3187, take 5) Jakub Jelinek
2009-12-01 20:14     ` Jason Merrill
2009-12-01 21:03     ` Dave Korn
2009-12-04 18:19       ` Dave Korn
2009-12-04 18:29         ` Jakub Jelinek
2009-12-04 18:46           ` Dave Korn
2009-12-27 13:36     ` H.J. Lu
2009-12-01 21:15 ` [C++ PATCH] Optimize C++ comdat ctors/dtors in classes without virtual bases (PR c++/3187, take 3) Daniel Jacobowitz
2009-12-01 21:20   ` Jakub Jelinek
2009-12-01 21:50     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091201074526.GP22813@hs20-bc2-1.build.redhat.com \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).