public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases)
Date: Sun, 12 Jun 2011 15:45:00 -0000	[thread overview]
Message-ID: <BANLkTimpPtQfbrLPNgqh_WSSNq-VRPEpuQ@mail.gmail.com> (raw)
In-Reply-To: <20110612145443.GA7920@kam.mff.cuni.cz>

On Sun, Jun 12, 2011 at 7:54 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>>
>> This also pretty much destroyed C++ for ia32:
>>
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49378
>> http://gcc.gnu.org/ml/gcc-regression/2011-06/msg00159.html
>
> Hi,
> It seems somewhat amazing that we hit kernel sensitive miscompilation here.
> The problem most probably is the fact that thunks and functions with thunks can become
> local. This is correct since thunks are represented as direct calls now, but this
> makes i386 to use local ABI when calling or compiling them.
>
> Does the following patch help? We may also need to look for the presence of thunk
> callers.
>
> Index: ipa.c
> ===================================================================
> --- ipa.c       (revision 174958)
> +++ ipa.c       (working copy)
> @@ -120,6 +120,7 @@ static bool
>  cgraph_non_local_node_p_1 (struct cgraph_node *node, void *data ATTRIBUTE_UNUSED)
>  {
>    return !(cgraph_only_called_directly_or_aliased_p (node)
> +           && !ipa_ref_has_aliases_p (&node->ref_list)
>            && node->analyzed
>            && !DECL_EXTERNAL (node->decl)
>            && !node->local.externally_visible
> @@ -132,7 +133,11 @@ cgraph_non_local_node_p_1 (struct cgraph
>  static bool
>  cgraph_local_node_p (struct cgraph_node *node)
>  {
> -   return !cgraph_for_node_and_aliases (cgraph_function_or_thunk_node (node, NULL),
> +   struct cgraph_node *n = cgraph_function_or_thunk_node (node, NULL);
> +
> +   if (n->thunk.thunk_p)
> +     return false;
> +   return !cgraph_for_node_and_aliases (n,
>                                        cgraph_non_local_node_p_1, NULL, true);
>
>  }
>

I am testing it now.  Will know the results in 2 hours.

Thanks.

-- 
H.J.

  reply	other threads:[~2011-06-12 15:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-11 14:22 Jan Hubicka
2011-06-11 17:31 ` H.J. Lu
2011-06-12  9:02   ` H.J. Lu
2011-06-12 15:08     ` Jan Hubicka
2011-06-12 15:45       ` H.J. Lu [this message]
2011-06-12 15:55         ` Jan Hubicka
2011-06-12 16:33         ` H.J. Lu
2011-06-12 16:29       ` H.J. Lu
2011-06-12 17:06         ` Jan Hubicka
2011-06-12 17:46           ` H.J. Lu
2011-06-12 17:13         ` Jan Hubicka
2011-06-12 18:07           ` H.J. Lu
2011-06-12 22:11             ` Jan Hubicka
2011-06-19 12:52 ` Hans-Peter Nilsson
2011-06-19 12:55   ` Jan Hubicka
2011-06-19 14:04     ` Jan Hubicka
2011-06-20 11:23       ` Richard Guenther
2011-06-20 14:47         ` Hans-Peter Nilsson
2011-06-22 21:54       ` 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=BANLkTimpPtQfbrLPNgqh_WSSNq-VRPEpuQ@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --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).