From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 035903857C65 for ; Thu, 17 Dec 2020 00:34:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 035903857C65 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B661831B; Wed, 16 Dec 2020 16:34:49 -0800 (PST) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.126]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 372DE3F718; Wed, 16 Dec 2020 16:34:49 -0800 (PST) From: Richard Sandiford To: Jeff Law via Gcc-patches Mail-Followup-To: Jeff Law via Gcc-patches , Jeff Law , richard.sandiford@arm.com Subject: Re: [PATCH 23/23] fwprop: Rewrite to use RTL SSA References: <85ed5e60-b4a1-a531-de5a-1088196a0580@redhat.com> Date: Thu, 17 Dec 2020 00:34:47 +0000 In-Reply-To: <85ed5e60-b4a1-a531-de5a-1088196a0580@redhat.com> (Jeff Law via Gcc-patches's message of "Tue, 15 Dec 2020 20:52:16 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2020 00:34:51 -0000 Jeff Law via Gcc-patches writes: > On 11/13/20 1:24 AM, Richard Sandiford via Gcc-patches wrote: >> This patch rewrites fwprop.c to use the RTL SSA framework. It tries >> as far as possible to mimic the old behaviour, even in caes where >> that doesn't fit naturally with the new framework. I've added ??? >> comments to mark those places, but I think =E2=80=9Cfixing=E2=80=9D them= should >> be done separately to make bisection easier. >> >> In particular: >> >> * The old implementation iterated over uses, and after a successful >> substitution, the new insn's uses were added to the end of the list. >> The pass still processed those uses, but because it processed them at >> the end, it didn't fully optimise one instruction before propagating >> it into the next. >> >> The new version follows the same approach for comparison purposes, >> but I'd like to drop that as a follow-on patch. >> >> * The old implementation operated on single use sites (DF_REF_LOCs). >> This doesn't work well for instructions with match_dups, where it's >> necessary to update both an operand and its dups at the same time. >> For example, attempting to substitute into a divmod instruction would >> fail because only the div or the mod side would be updated. >> >> The new version again follows this to some extent for comparison >> purposes (although not exactly). Again I'd like to drop it as a >> follow-on patch. >> >> One difference is that if a register occurs in multiple MEM addresses >> in a set, the new version will try to update them all at once. This is >> what causes the SVE ACLE st4* output to improve. >> >> Also, the old version didn't naturally guarantee termination (PR79405), >> whereas the new one does. >> >> gcc/ >> * fwprop.c: Rewrite to use the RTL SSA framework. >> >> gcc/testsuite/ >> * gcc.dg/rtl/x86_64/test-return-const.c.before-fwprop.c: Don't >> expect insn updates to be deferred. >> * gcc.target/aarch64/sve/acle/asm/st4_s8.c: Expect the addition >> to be folded into the address. >> * gcc.target/aarch64/sve/acle/asm/st4_s8.c: Likewise. > Consider killing the ADD_NOTES bits. Done (and glad to see it go). > s/eqaul/equal/ to fix a typo. Oops, fixed. > Naturally I'm happy at how much by-hand RTL analysis code just > disappears with this change :-) > > Ideally you'll drop this in tomorrow and we can get a fresh run of all > the targets in my tester before the weekend.=C2=A0 I won't be stressed if= we > see some fallout, but I don't expect much.=C2=A0 I'll help track them dow= n if > they occur. Thanks, now pushed with the above changes. Richard