From patchwork Tue Oct 25 11:37:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 79151 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp3062001qge; Tue, 25 Oct 2016 04:37:42 -0700 (PDT) X-Received: by 10.99.64.132 with SMTP id n126mr31498920pga.87.1477395462658; Tue, 25 Oct 2016 04:37:42 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id p17si20274746pge.244.2016.10.25.04.37.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Oct 2016 04:37:42 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-439490-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-439490-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-439490-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=hgmDb1e5cyvrfwzrzvgZjA9INcW2kbwdhQzlY30jpq5IqEXr/D gDqAisbpC7sbINqnLLiGTWDIOBnAxOOKUmyRjEmmvI4d3zOCTVRNXict3YdGSsci S5lm5YB8Id7xhOygCOYUj1u0bHvVecCgybnVPdaYGET+YJ58qC1Nl2XZg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=LE2CdT6yF783ezGhzpGc02GyMJ0=; b=MHgN1HBQA2zbR8AjcBgF iatI0CNxWidTQWO8iDN+egj5AxLKUkl6/AweB165a6DB1ULhyBB4G4XIZyg+lK0L HCeOp9DO6cFPqHJSpcWZX6SNBz8GHQDPnWvyg0QUsGNdT8rQiinMo+4zDgAxLNv4 nPhwYcdEGOMc43XfMyD/ADE= Received: (qmail 102489 invoked by alias); 25 Oct 2016 11:37:25 -0000 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 Received: (qmail 99996 invoked by uid 89); 25 Oct 2016 11:37:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=Perform, scanned 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 ESMTP; Tue, 25 Oct 2016 11:37:14 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7F90BAAB9; Tue, 25 Oct 2016 11:37:12 +0000 (UTC) To: GCC Patches , "H.J. Lu" From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH] Fix 2 typos in IPA ICF pass Message-ID: Date: Tue, 25 Oct 2016 13:37:11 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi. Simple fix for a typo in IPA ICF. It cant' cause a regression as cl_target_option_eq function is called in equals_wpa function. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From e4f9f913c32109a2773145870333ae88fc9cdae2 Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 25 Oct 2016 09:57:55 +0200 Subject: [PATCH] Fix 2 typos in IPA ICF pass gcc/testsuite/ChangeLog: 2016-10-25 Martin Liska * gcc.dg/ipa/ipa-icf-32.c: Removed one scanned pattern. gcc/ChangeLog: 2016-10-25 H.J. Lu Martin Liska PR ipa/78099 * common.opt: Mark flag_ipa_icf_variables as Optimization flag. * ipa-icf.c (sem_function::get_hash): Add target optimization node to hash. --- gcc/common.opt | 2 +- gcc/ipa-icf.c | 1 + gcc/testsuite/gcc.dg/ipa/ipa-icf-32.c | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/common.opt b/gcc/common.opt index 6f24f56..729cbd8 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1597,7 +1597,7 @@ Common Report Var(flag_ipa_icf_functions) Optimization Perform Identical Code Folding for functions. fipa-icf-variables -Common Report Var(flag_ipa_icf_variables) +Common Report Var(flag_ipa_icf_variables) Optimization Perform Identical Code Folding for variables. fipa-reference diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 3886fa6..e8880cb 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -300,6 +300,7 @@ sem_function::get_hash (void) (cl_target_option_hash (TREE_TARGET_OPTION (DECL_FUNCTION_SPECIFIC_TARGET (decl)))); if (DECL_FUNCTION_SPECIFIC_OPTIMIZATION (decl)) + hstate.add_wide_int (cl_optimization_hash (TREE_OPTIMIZATION (DECL_FUNCTION_SPECIFIC_OPTIMIZATION (decl)))); hstate.add_flag (DECL_CXX_CONSTRUCTOR_P (decl)); diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-32.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-32.c index 9f42918..df11ac5 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-32.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-32.c @@ -19,5 +19,4 @@ int main() return foo (0) + bar (0); } -/* { dg-final { scan-ipa-dump "optimization flags are different" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf" } } */ -- 2.10.1