From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8032 invoked by alias); 12 Jun 2011 16:27:49 -0000 Received: (qmail 8022 invoked by uid 22791); 12 Jun 2011 16:27:48 -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-qy0-f182.google.com (HELO mail-qy0-f182.google.com) (209.85.216.182) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 12 Jun 2011 16:27:26 +0000 Received: by qyk27 with SMTP id 27so2296353qyk.20 for ; Sun, 12 Jun 2011 09:27:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.17.148 with SMTP id s20mr3168758qca.149.1307896044408; Sun, 12 Jun 2011 09:27:24 -0700 (PDT) Received: by 10.229.47.78 with HTTP; Sun, 12 Jun 2011 09:27:24 -0700 (PDT) In-Reply-To: References: <20110611125552.GA25068@kam.mff.cuni.cz> <20110612145443.GA7920@kam.mff.cuni.cz> Date: Sun, 12 Jun 2011 16:33: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/msg00948.txt.bz2 On Sun, Jun 12, 2011 at 8:01 AM, H.J. Lu wrote: > 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 he= re. >> The problem most probably is the fact that thunks and functions with thu= nks 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 ATTRI= BUTE_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, NUL= L); >> + >> + =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. =A0Will know the results in 2 hours. > Yes, it fixes C++ regressions. Thanks. --=20 H.J.