public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/48674] [4.7 Regression] FAIL: g++.dg/torture/pr48661.C
Date: Mon, 02 May 2011 15:38:00 -0000	[thread overview]
Message-ID: <bug-48674-4-E0WV2Wy7Ho@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48674-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #11 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-05-02 15:26:23 UTC ---
> Most of them is moot if we just accept that direct calls to thunks are
> a barrier for IPA optimizations (in the case they do not have a gimple
> body).  We could represent variadic thunks in gimple using
> __builtin_va_arg_pack

Well, we could also go for the "half way" variant. Represent those thunks we
can and handle those thunks we can't as special cases. Problem of this is
  1) real thunks will become even more weird and rare special case (I think
     we have two testcases for variadic thunks in testsuite)
  2) we will need to forbid certain class of transformations of boides or the
     plan to throw them away won't work.

     We don't want to change function signatures, for example, we don't want
     to remove THIS parameter because we prove it is dead. 
     Things, like cloning, will most likely have tendency to upset ASM
     machinery in particular on exotic targets.
It seems to me that we would replace one ugly case of thunks, but two classes
of more evil thunks and less evil thunks.

> Similar to aliases (which, of course, also has ugly current handling).

Yes, aliases and thunks are symmetric to large extend. Thus my plan to handle

> So, indeed it sort-of makes sense to do symtab related changes first to
> get aliases implemented in a sane way.  As thunks really need similar
> handling in a lot of places.

Yep, or go the other way - first get thunks working and then make aliases on
top of them.  Aliases are more difficult than thunks by
  1) they can have different visibilities than the symbol they alias
  2) there is problem with fact that we don't know symbol names
  3) they have target specific behavior. I.e. ELF has no aliases in end, but
     some targets do. 
So one way or another, the conversion is not fun ;(

Honza


  parent reply	other threads:[~2011-05-02 15:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18 23:31 [Bug middle-end/48674] New: " hjl.tools at gmail dot com
2011-04-18 23:34 ` [Bug middle-end/48674] " hjl.tools at gmail dot com
2011-04-19  6:43 ` jakub at gcc dot gnu.org
2011-04-19  9:49 ` rguenth at gcc dot gnu.org
2011-05-02 13:03 ` ro at gcc dot gnu.org
2011-05-02 13:36 ` rguenth at gcc dot gnu.org
2011-05-02 13:48 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-05-02 13:49 ` rguenth at gcc dot gnu.org
2011-05-02 14:28 ` rguenth at gcc dot gnu.org
2011-05-02 14:56 ` hubicka at gcc dot gnu.org
2011-05-02 15:02 ` hubicka at gcc dot gnu.org
2011-05-02 15:10 ` rguenth at gcc dot gnu.org
2011-05-02 15:38 ` hubicka at gcc dot gnu.org [this message]
2011-05-14 12:57 ` dominiq at lps dot ens.fr
2011-08-02 14: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-48674-4-E0WV2Wy7Ho@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).