From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 927 invoked by alias); 17 Jun 2014 19:49:49 -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 916 invoked by uid 89); 17 Jun 2014 19:49:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 17 Jun 2014 19:49:48 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5HJnkIx024756 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Jun 2014 15:49:46 -0400 Received: from stumpy.slc.redhat.com (ovpn-113-70.phx2.redhat.com [10.3.113.70]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5HJnkv8013876; Tue, 17 Jun 2014 15:49:46 -0400 Message-ID: <53A09BDA.5020400@redhat.com> Date: Tue, 17 Jun 2014 19:49:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: mliska , gcc-patches@gcc.gnu.org CC: hubicka@ucw.cz Subject: Re: [PATCH 1/5] New Identical Code Folding IPA pass References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg01385.txt.bz2 On 06/13/14 04:24, mliska wrote: > > You may ask, why the GNU GCC does need such a new optimization. The > compiler, having simply better knowledge of a compiled source file, > is capable of reaching better results, especially if Link-Time > optimization is enabled. Apart from that, GCC implementation adds > support for read-only variables like construction vtables (mentioned > in: > http://hubicka.blogspot.cz/2014/02/devirtualization-in-c-part-3-building.html). Can you outline at a high level cases where GCC's knowledge allows it to reach a better result? Is it because you're not requiring bit for bit identical code, but that the code merely be semantically equivalent? The GCC driven ICF seems to pick up 2X more opportunities than the gold driven ICF. But if I'm reading everything correctly, that includes ICF of both functions and variables. Do you have any sense of how those improvements break down? ie, is it mostly more function's you're finding as identical, and if so what is it about the GCC implementation that allows us to find more ICF opportunities. If it's mostly variables, that's fine too. I'm just trying to understand where the improvements are coming from. Jeff