public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: Richard Guenther <rguenther@suse.de>
Cc: Jan Hubicka <hubicka@ucw.cz>, "H.J. Lu" <hjl.tools@gmail.com>,
	gcc-patches@gcc.gnu.org
Subject: Re: varpool alias reorg
Date: Mon, 27 Jun 2011 09:50:00 -0000	[thread overview]
Message-ID: <20110627091629.GB22865@kam.mff.cuni.cz> (raw)
In-Reply-To: <alpine.LNX.2.00.1106271050010.810@zhemvz.fhfr.qr>

> > There are two problems here
> >   1) We do not stream builtin decls and merge them outside lto-symtab (by just
> >      streaming references to builtins with their asm names).  There is at least
> >      one extra PR related to this and on my TODO is to simply remove the code.
> >   2) Aliases within single unit works only when both the alias and the target use
> >      asm name.  This is because internally we store mangled DECL_ASSEMBLER_NAME and the
> >      alias_pair code.
> >      With LTO this breaks existing code simply because what used to be multiple units
> >      and thus safe is now single LTO unit.
> > 
> >      Dave Korn fixed part of the problem by introducing mangling code into lto-symtab
> >      His code solve similar problems with aliases from the asm code, but it
> >      did not solve the problem with aliases from LTO units, like here, simply
> >      because alias pair code bypass the lto-symtab.  One of goals of the incorrect patch
> >      above is to make lto-symtab to do the merging and thus fix this issue (for now at
> >      all decls except for builtins).
> > 
> >      Still it would be good to solve the problem on non-LTO compilation, too.
> >      We discussed introduction of proper symbol table into GCC at the GCC gathering last
> >      weekend.  It is where I am heading but it will take some time.
> > 
> > Until that happens, I suggest fixing the testcase same was as we already fixed
> > the memops-asm-lib.c in 4.6 timeframe.
> > 
> > Bootstrapped/regtested x86_64-linux, OK?
> 
> Ok.
Hi,
thanks!  Could you, please, also consider the second two variants I sent?  In
general attribute used is needed when implementing libfuncs since we never know
when folding will intoduce new libcall (like in memops-asm).  However this
particular case don't need use because the builtin is called directly.
They also solve the problem of BLOCK lists being messed up.

In meantime I tested both variants and they pass.  I will add a changelog, of course.

Honza

  reply	other threads:[~2011-06-27  9:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-18  9:11 Jan Hubicka
2011-06-18 14:49 ` H.J. Lu
2011-06-23 14:34   ` H.J. Lu
2011-06-23 16:44     ` Jan Hubicka
2011-06-24 12:30       ` Jan Hubicka
2011-06-24 12:33         ` Jan Hubicka
2011-06-27 14:08           ` Richard Guenther
2011-06-27 16:13             ` Jan Hubicka
2011-06-27 16:22               ` Michael Matz
2011-06-28  8:34               ` Richard Guenther
2011-06-27  9:43       ` Richard Guenther
2011-06-27  9:50         ` Jan Hubicka [this message]
2011-06-22  8:17 ` Regression with "varpool alias reorg" Hans-Peter Nilsson

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=20110627091629.GB22865@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=rguenther@suse.de \
    /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).