From patchwork Sat Jun 26 10:31:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 57054 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id A9447B6EF0 for ; Sat, 26 Jun 2010 20:31:10 +1000 (EST) Received: (qmail 32211 invoked by alias); 26 Jun 2010 10:31:09 -0000 Received: (qmail 32200 invoked by uid 22791); 26 Jun 2010 10:31:08 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nikam-dmz.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 26 Jun 2010 10:31:04 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 35FD89AC8D4; Sat, 26 Jun 2010 12:31:02 +0200 (CEST) Date: Sat, 26 Jun 2010 12:31:02 +0200 From: Jan Hubicka To: Jan Hubicka Cc: Paolo Carlini , "H.J. Lu" , Richard Guenther , gcc-patches@gcc.gnu.org Subject: Re: Partial inlining Message-ID: <20100626103102.GB7562@kam.mff.cuni.cz> References: <20100622105258.GA15547@kam.mff.cuni.cz> <20100625083332.GA5209@atrey.karlin.mff.cuni.cz> <20100626091630.GB23703@atrey.karlin.mff.cuni.cz> <4C25C9F1.2040504@oracle.com> <20100626100016.GC23703@atrey.karlin.mff.cuni.cz> <20100626102012.GA7562@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100626102012.GA7562@kam.mff.cuni.cz> User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org > > > On 06/26/2010 11:16 AM, Jan Hubicka wrote: > > > >>> You seem to be consistently on less dumping by default than me. I find dumping > > > >>> of reasons why split points are not accepted quite useful, but I guess using > > > >>> -details is not problem. > > > >>> > > > >>> > > > >> This breaks C++: > > > >> > > > >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44671 > > > >> > > > > This does not reproduce for me (at least with "Fix PHI handling in ipa-split" patch my tree) > > > > I am now re-trying from scratch. > > > > > > > The problem is definitely there. See, for example: > > > > > > http://gcc.gnu.org/ml/gcc-testresults/2010-06/msg02660.html > > > > > > and I have just reproduced it myself once more with r161427. > > > > It is interesting indeed, I get > > === libstdc++ Summary === > > > > # of expected passes 7160 > > # of expected failures 61 > > # of unsupported tests 341 > > > > on build on gcc14 compilation farm. On gcc17 the problem however reproduce and goes away when the > > testsuite_shard is comiled with -fno-partial-inlining. > > The difference is use of GOLD as linker. I am investigating if we are hitting GNU LD bug or if GCC incorrectly > emits direct calls to the function in question. So it is GOLD's problem, it misses diagnostics here on PCrel relocations pointing outside of DSO. Ian, perhaps GOLD should be told about this? I am testing the following fix. The problem is that cgraph_function_versioning calls cgraph_make_decl_local twice while doing it just once would suffice. First time it calls the DECL on the old assembler name that makes cgraph_make_decl_local to take away the WEAK flag from RTL symbol of the original function. This leads us to output the incorrect direct pointers. I am bootstrapping/regtesting the following patch and will commit it once it passes. My apologizes for the problem. Honza PR middle-end/44671 * cgraphunit.c (cgraph_function_versioning): Remove wrong cgraph_make_decl_local call. Index: cgraphunit.c =================================================================== --- cgraphunit.c (revision 161427) +++ cgraphunit.c (working copy) @@ -2196,7 +2196,6 @@ cgraph_function_versioning (struct cgrap else new_decl = build_function_decl_skip_args (old_decl, args_to_skip); - cgraph_make_decl_local (new_decl); /* Generate a new name for the new version. */ DECL_NAME (new_decl) = clone_function_name (old_decl, clone_name); SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl));