From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30764 invoked by alias); 12 Jun 2011 15:01:55 -0000 Received: (qmail 30754 invoked by uid 22791); 12 Jun 2011 15:01:54 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-qw0-f47.google.com (HELO mail-qw0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 12 Jun 2011 15:01:39 +0000 Received: by qwh5 with SMTP id 5so2136679qwh.20 for ; Sun, 12 Jun 2011 08:01:38 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.179.203 with SMTP id br11mr3182006qab.197.1307890897371; Sun, 12 Jun 2011 08:01:37 -0700 (PDT) Received: by 10.229.47.78 with HTTP; Sun, 12 Jun 2011 08:01:37 -0700 (PDT) In-Reply-To: <20110612145443.GA7920@kam.mff.cuni.cz> References: <20110611125552.GA25068@kam.mff.cuni.cz> <20110612145443.GA7920@kam.mff.cuni.cz> Date: Sun, 12 Jun 2011 15:45:00 -0000 Message-ID: Subject: Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases) From: "H.J. Lu" To: Jan Hubicka Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00944.txt.bz2 On Sun, Jun 12, 2011 at 7:54 AM, Jan Hubicka wrote: >> >> This also pretty much destroyed C++ for ia32: >> >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D49378 >> http://gcc.gnu.org/ml/gcc-regression/2011-06/msg00159.html > > Hi, > It seems somewhat amazing that we hit kernel sensitive miscompilation her= e. > The problem most probably is the fact that thunks and functions with thun= ks 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 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- ipa.c =A0 =A0 =A0 (revision 174958) > +++ ipa.c =A0 =A0 =A0 (working copy) > @@ -120,6 +120,7 @@ static bool > =A0cgraph_non_local_node_p_1 (struct cgraph_node *node, void *data ATTRIB= UTE_UNUSED) > =A0{ > =A0 =A0return !(cgraph_only_called_directly_or_aliased_p (node) > + =A0 =A0 =A0 =A0 =A0 && !ipa_ref_has_aliases_p (&node->ref_list) > =A0 =A0 =A0 =A0 =A0 =A0&& node->analyzed > =A0 =A0 =A0 =A0 =A0 =A0&& !DECL_EXTERNAL (node->decl) > =A0 =A0 =A0 =A0 =A0 =A0&& !node->local.externally_visible > @@ -132,7 +133,11 @@ cgraph_non_local_node_p_1 (struct cgraph > =A0static bool > =A0cgraph_local_node_p (struct cgraph_node *node) > =A0{ > - =A0 return !cgraph_for_node_and_aliases (cgraph_function_or_thunk_node = (node, NULL), > + =A0 struct cgraph_node *n =3D cgraph_function_or_thunk_node (node, NULL= ); > + > + =A0 if (n->thunk.thunk_p) > + =A0 =A0 return false; > + =A0 return !cgraph_for_node_and_aliases (n, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0cgraph_non_local_node_p_1, NULL, true); > > =A0} > I am testing it now. Will know the results in 2 hours. Thanks. --=20 H.J.