From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73156 invoked by alias); 6 Aug 2019 15:43:30 -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 73078 invoked by uid 89); 6 Aug 2019 15:43:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Aug 2019 15:43:28 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 81B4BB0BA for ; Tue, 6 Aug 2019 15:43:26 +0000 (UTC) Resent-From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Resent-To: GCC Patches Resent-Date: Tue, 6 Aug 2019 17:43:26 +0200 Resent-Message-ID: <9752e2de-7be0-54ca-477a-938e19ea5231@suse.cz> Message-Id: In-Reply-To: <1286db9e-572c-556f-5298-3d301264de95@suse.cz> References: <1286db9e-572c-556f-5298-3d301264de95@suse.cz> From: Martin Liska Date: Tue, 06 Aug 2019 15:44:00 -0000 Subject: [PATCH 0/9] IPA ICF overhaul To: gcc-patches@gcc.gnu.org X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00384.txt.bz2 Hi. It's some time I implemented first version of IPA ICF pass. Since that I experienced more with the GCC internals and now is the right time to do an overhaul. Main motivation of changes is to share as many as possible in between current operand_equal_p and ipa_icf::compare_operand. That's achieved by a new class operand_compare. That allows use to share and unify a lot of code. Apart from that I would like to learn current operand_equal_p to handle new tree types. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. I also built Firefox, Godot engine. Thanks, Martin Martin Liska (9): Replace int with boolean in predicate functions. operand_equal_p: add support for FIELD_DECL operand_equal_p: add support for OBJ_TYPE_REF. Strengthen alias_ptr_types_compatible_p in LTO mode. Come up with an abstraction. Integrate that for IPA ICF. IPA ICF: remove dead code Remove comparison for polymorphic types. Remove alias set comparison. gcc/alias.c | 7 +- gcc/fold-const.c | 547 +++++++++++++++--- gcc/fold-const.h | 30 +- gcc/ipa-icf-gimple.c | 328 ++--------- gcc/ipa-icf-gimple.h | 16 +- gcc/ipa-icf.c | 19 +- gcc/ipa-icf.h | 3 - .../c-c++-common/Wstringop-truncation-4.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-40.c | 32 + gcc/testsuite/gcc.dg/{torture => }/pr70740.c | 3 +- gcc/testsuite/gcc.dg/tree-ssa/pr64910-2.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/pr79352.c | 2 +- gcc/testsuite/gcc.dg/vect/vect-35-big-array.c | 3 +- gcc/testsuite/gcc.dg/vect/vect-35.c | 3 +- gcc/testsuite/gfortran.dg/vect/vect-8.f90 | 2 +- gcc/tree.c | 273 --------- 16 files changed, 588 insertions(+), 684 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/ipa/ipa-icf-40.c rename gcc/testsuite/gcc.dg/{torture => }/pr70740.c (77%) -- 2.22.0