public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/53572] Some public symbols don't get to serialized LTO
Date: Mon, 04 Jun 2012 19:53:00 -0000	[thread overview]
Message-ID: <bug-53572-4-gVcxr6wOHV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53572-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53572

--- Comment #5 from Jan Hubicka <hubicka at ucw dot cz> 2012-06-04 19:52:51 UTC ---
> > !node->symbol.used_from_other_partition
> > -         && (DECL_COMDAT (node->symbol.decl)
> > +         && ((DECL_COMDAT (node->symbol.decl)
> > +              && symtab_used_from_object_file_p ((symtab_node) node))
> 
> && !symtab_used_from_object_file_p

Ah, yes. Sorry.
> 
> I suppose.  I would have expected used_from_other_partition to be true

Well, used_from_other_partition reffers to IR partitions, not "other uses".
I would not mix them unless we need so. There are some differences - like
symbols from other partitions can be local and can use custom calling
conventions.
Symbols used form asm can't.

> > But perhaps it is now resonable to expect V2 linker API even for GCC 4.7 based
> > setups for sane LTO with C++?  We already mention in release notes that V1 API
> > is bad idea...
> 
> Well, sure - assuming that we have a V2 capable linker is ok I guess.  In the
> end we should simply annotate the resolution file with the linker capability,
> thus extend the file-format to include a one-line header with a version.

As I tried to explain on IRC, this won't help since V1/V2 API differs already
on compile time when we don't have linker plugin and have no clue what version
of API will be used at linktime.
It is possible to teach lto-plugin to do the hack instead of doing it in 
lto-streamer-out.c if we really want sane support for V1 API.

Concerning the problem in this PR, i guess we probably should give up handling
this sanely in V1 API: we already hide COMDAT vtables and type descriptions
should be harmless/dropped by the linker eventually.

Honza


  parent reply	other threads:[~2012-06-04 19:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04 12:37 [Bug lto/53572] New: " tetra2005 at gmail dot com
2012-06-04 12:53 ` [Bug lto/53572] " rguenth at gcc dot gnu.org
2012-06-04 14:11 ` hubicka at gcc dot gnu.org
2012-06-04 14:19 ` hubicka at gcc dot gnu.org
2012-06-04 14:38 ` rguenth at gcc dot gnu.org
2012-06-04 19:53 ` hubicka at ucw dot cz [this message]
2012-06-05 10:54 ` tetra2005 at gmail dot com
2012-06-12 10:43 ` rguenth at gcc dot gnu.org
2012-06-25 15:07 ` hubicka at gcc dot gnu.org
2012-06-26 10:15 ` hubicka at gcc dot gnu.org
2012-07-23 12:54 ` Christopher.Hite at partner dot commerzbank.com
2012-09-04 23:49 ` matt at use dot net
2012-09-07 13:06 ` rguenth at gcc dot gnu.org
2012-09-07 13:07 ` rguenth at gcc dot gnu.org
2012-09-07 13:08 ` rguenth at gcc dot gnu.org

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=bug-53572-4-gVcxr6wOHV@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).