From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113961 invoked by alias); 12 Nov 2015 09:50:08 -0000 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 Received: (qmail 113948 invoked by uid 89); 12 Nov 2015 09:50:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Thu, 12 Nov 2015 09:50:06 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 452D0AC21; Thu, 12 Nov 2015 09:49:42 +0000 (UTC) Subject: Re: [PATCH] Fix PR ipa/68035 To: Jan Hubicka References: <563C6E86.6040808@suse.cz> <20151106164358.GA93383@kam.mff.cuni.cz> Cc: GCC Patches From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <564460CB.90209@suse.cz> Date: Thu, 12 Nov 2015 09:50:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151106164358.GA93383@kam.mff.cuni.cz> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg01465.txt.bz2 On 11/06/2015 05:43 PM, Jan Hubicka wrote: >> Hello. >> >> Following patch triggers hash calculation of items (functions and variables) >> in situations where LTO mode is not utilized. >> >> Patch survives regression tests and bootstraps on x86_64-linux-pc. >> >> Ready for trunk? >> Thanks, >> Martin > >> >From 62266e21a89777c6dbd680f7c87f15abe603c024 Mon Sep 17 00:00:00 2001 >> From: marxin >> Date: Thu, 5 Nov 2015 18:31:31 +0100 >> Subject: [PATCH] Fix PR ipa/68035 >> >> gcc/testsuite/ChangeLog: >> >> 2015-11-05 Martin Liska >> >> * gcc.dg/ipa/pr68035.c: New test. >> >> gcc/ChangeLog: >> >> 2015-11-05 Martin Liska >> >> PR ipa/68035 >> * ipa-icf.c (sem_item_optimizer::build_graph): Force building >> of a hash value for an item if we are not running in LTO mode. >> --- >> gcc/ipa-icf.c | 4 ++ >> gcc/testsuite/gcc.dg/ipa/pr68035.c | 108 +++++++++++++++++++++++++++++++++++++ >> 2 files changed, 112 insertions(+) >> create mode 100644 gcc/testsuite/gcc.dg/ipa/pr68035.c >> >> diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c >> index 7bb3af5..09c42a1 100644 >> --- a/gcc/ipa-icf.c >> +++ b/gcc/ipa-icf.c >> @@ -2744,6 +2744,10 @@ sem_item_optimizer::build_graph (void) >> { >> sem_item *item = m_items[i]; >> m_symtab_node_map.put (item->node, item); >> + >> + /* Initialize hash values if we are not in LTO mode. */ >> + if (!in_lto_p) >> + item->get_hash (); >> } > > Hmm, what is the difference to the LTO mode here. I would have expected that all the items > was analyzed in both paths? Difference is that in case of the LTO mode, the hash value is read from streamed LTO file. On the other hand, in classic compilation mode we have to force the calculation as a hash value is computed lazily. Please take a look at just sent suggested patch. Thanks, Martin > > Honza >