From: Richard Guenther <rguenther@suse.de>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Avoid double mangling at WHOPR
Date: Mon, 10 Oct 2011 13:45:00 -0000 [thread overview]
Message-ID: <alpine.LNX.2.00.1110101527000.2130@zhemvz.fhfr.qr> (raw)
In-Reply-To: <20111010132223.GF25361@kam.mff.cuni.cz>
On Mon, 10 Oct 2011, Jan Hubicka wrote:
> > > Actually it seems to me that mangling at WPA makes more sense - you don't get
> > > symbol name sensitive on partitioning decisions so things go a bit more
> > > consistently. Partitioning depends on global properties of program so any code
> > > that depends on particular partitioning decisions will have tendency to
> > > randomly break and unbreak.
> > >
> > > We can not really make any promises about our ability to not mangle particular
> > > symbol (for use in asm code or whatever): we need to mangle on the occasion of
> > > conflict with another static symbol but also when we decide to promote it
> > > hidden. We have no information about another hidden symbol in the non-LTO
> > > world. Either linker plugin API needs to be extended by providing us with list
> > > of forbidden names or ability to have "hidden in LTO world" visibility or we
> > > probably need to start using random seeds on all promoted symbols.
> > > (in fact I already do sort of mangling to avoid conflict on comdats that has been
> > > brought local and then again promoted global, I just did not noticed it is a general
> > > problem back then when I first saw the linker complaining).
> >
> > Ok, I see why it makes sense on WPA time. But then why not mangle
> > during partitioning? I think it still makes sense to avoid mangling local
> > decls, if not for debugging experience.
>
> Yeah, we could do that. Debugging experience is quite good reason (though it will
> also make bogus asm statements magically work and break on random basis. In a way
> just breaking them seems more sensible behaviour to me ;) ).
;)
> > We do mangle late when we bring symbols local anyway, no? I also
> > seem to remember we mangle at LTO time, too ...
>
> Hmm, I think we mangle at stream in since we do make hashtables based on symbol names
> that are supposed to be unique, but perhaps I am wrong.
I think we do not hash local symbols, so that shouldn't be an issue.
> LTO time you mean at compilation time when streaming out? I am not aware of that.
Maybe that changed then or I misremember.
Can you try the "obvious" and simply mangle all local statics at
partitioning time? (leaving the non-conflict case for a further
improvement)
Richard.
next prev parent reply other threads:[~2011-10-10 13:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-09 18:34 Jan Hubicka
2011-10-10 9:39 ` Richard Guenther
2011-10-10 13:22 ` Jan Hubicka
2011-10-10 13:22 ` Richard Guenther
2011-10-10 13:31 ` Jan Hubicka
2011-10-10 13:45 ` Richard Guenther [this message]
2011-10-10 13:48 ` Jan Hubicka
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=alpine.LNX.2.00.1110101527000.2130@zhemvz.fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
/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).