From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 429643858009 for ; Tue, 24 Nov 2020 05:50:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 429643858009 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-201-1WdfISrkNlyLpvBLsO91Ig-1; Tue, 24 Nov 2020 00:50:21 -0500 X-MC-Unique: 1WdfISrkNlyLpvBLsO91Ig-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5E8FF8042AD; Tue, 24 Nov 2020 05:50:20 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-152.phx2.redhat.com [10.3.113.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 248F35C1A3; Tue, 24 Nov 2020 05:50:20 +0000 (UTC) Subject: Re: H8 cc0 conversion To: Hans-Peter Nilsson Cc: GCC Patches References: <97ecedff-d840-a5cc-8178-39ce8e2175c5@redhat.com> From: Jeff Law Message-ID: <61fe31f6-bfb0-6adc-6f5b-dc7dca1e8634@redhat.com> Date: Mon, 23 Nov 2020 22:50:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: Tue, 24 Nov 2020 05:50:26 -0000 On 11/23/20 9:49 PM, Hans-Peter Nilsson wrote: > On Sun, 22 Nov 2020, Jeff Law via Gcc-patches wrote: >> This is the primary patch for cc0 removal on the H8 port.? It doesn't >> have any of the optimization work and many patterns are simply disabled >> at this time.? It's working well enough to not regress the testsuite. >> >> The H8 is similar to the m68k and other ports in that the vast majority >> of instructions clobber the condition codes, including most of the >> arithmetic insns that reload needs to use. While there's a special >> adds/subs that does not modify the condition codes, they only accept >> constant addends of 1, 2 and 4. With that in mind, this port does not >> expose cc0 until after reload. So most patterns are defined using >> define_insn_and_split. The splitter adds the appropriate clobbers. > JFTR (as I'm repeating a previous note for another port): if > you'd went for exposing cc0 *before* reload (adding a clobber to > each pattern that clobbers, then specifying exceptions removing > them), the amount of (required) define_insn_and_splits would > have been zero; typically much less churn in the port. That > approach also has the benefit of insns not "silently" changing > behavior at reload-time. > > You might think a parallel with a clobber for each insn hampers > some rtl optimizations, but I found that to be not an issue at > all, doing that for CRIS (at least when comparing to the cc0 > version). I've definitely seen cases where exposing the clobber early hurts, so I went with exposing after reload. I also had someone else doing most of the grunt work, my son :-) Jeff