From patchwork Sun Jun 12 17:45:58 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 100110 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 47B93B70A3 for ; Mon, 13 Jun 2011 03:46:18 +1000 (EST) Received: (qmail 4789 invoked by alias); 12 Jun 2011 17:46:17 -0000 Received: (qmail 4781 invoked by uid 22791); 12 Jun 2011 17:46:16 -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.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 12 Jun 2011 17:46:00 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id D66699AC80B; Sun, 12 Jun 2011 19:45:58 +0200 (CEST) Date: Sun, 12 Jun 2011 19:45:58 +0200 From: Jan Hubicka To: "H.J. Lu" Cc: Jan Hubicka , gcc-patches@gcc.gnu.org Subject: Re: Cgraph alias reorg 15/14 (New infrastructure for same body aliases) Message-ID: <20110612174558.GA10123@kam.mff.cuni.cz> References: <20110611125552.GA25068@kam.mff.cuni.cz> <20110612145443.GA7920@kam.mff.cuni.cz> <20110612164059.GE19441@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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 Hi, this patch solves the bultin/strlen-3.c LTO linker plugin problem. While removing alias code I was bit overactive and removed the check that makes us to implicitly do -fwhole-program when resolution info is around. It is not quite clear to me why in LTO we need -fwhole-program to get the testcase right. Bootstrap/regtest in progress, will commit it once it passes. * ipa.c (cgraph_exernally_visible_p): Return accidentally removed check for LDPR_PREVAILING_DEF_IRONLY. Index: ipa.c =================================================================== --- ipa.c (revision 174955) +++ ipa.c (working copy) @@ -614,6 +614,8 @@ /* If linker counts on us, we must preserve the function. */ if (cgraph_used_from_object_file_p (node)) return true; + if (node->resolution == LDPR_PREVAILING_DEF_IRONLY) + return false; if (DECL_PRESERVE_P (node->decl)) return true; if (lookup_attribute ("externally_visible", DECL_ATTRIBUTES (node->decl)))