From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from arjuna.pair.com (arjuna.pair.com [209.68.5.131]) by sourceware.org (Postfix) with ESMTPS id 00DCC3858D37 for ; Wed, 26 Aug 2020 03:58:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 00DCC3858D37 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=bitrange.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=hp@bitrange.com Received: by arjuna.pair.com (Postfix, from userid 3006) id 518598A554; Tue, 25 Aug 2020 23:58:54 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by arjuna.pair.com (Postfix) with ESMTP id 5098F8A54F; Tue, 25 Aug 2020 23:58:54 -0400 (EDT) Date: Tue, 25 Aug 2020 23:58:54 -0400 (EDT) From: Hans-Peter Nilsson X-X-Sender: hp@arjuna.pair.com To: law@redhat.com cc: Senthil Kumar Selvaraj , Pip Cet , gcc@gcc.gnu.org, ebotcazou@adacore.com, Segher Boessenkool Subject: Re: Clobber REG_CC only for some constraint alternatives? In-Reply-To: <00b58374d0a1de961afc7e05f0ad1a595b248deb.camel@redhat.com> Message-ID: References: <87o8nd1npw.fsf@gcc.gnu.org> <20200814162307.GM6753@gate.crashing.org> <20200815002957.GR6753@gate.crashing.org> <20200816005037.GT6753@gate.crashing.org> <87mu2t20f3.fsf@gcc.gnu.org> <87lfic1m5g.fsf@gcc.gnu.org> <87o8n5s3n6.fsf@gcc.gnu.org> <00b58374d0a1de961afc7e05f0ad1a595b248deb.camel@redhat.com> User-Agent: Alpine 2.20.16 (BSF 172 2016-09-29) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, 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@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Aug 2020 03:58:56 -0000 On Mon, 24 Aug 2020, Jeff Law via Gcc wrote: > On Thu, 2020-08-20 at 21:36 +0530, Senthil Kumar Selvaraj via Gcc wrote: > > The post-reload splitter introduces the clobber. The wiki > > suggests that approach if most insns clobber REG_CC, perhaps because of > > the missed optimizations you describe below? > If most patterns set/clobber the flags, then yes, it's slightly better to only > expose them after reload. Various passes that directly grub through RTL rather > than using helpers like single_set will optimize things better. The "slightly" being omissions like the one fixed in combine.c last month. ;-) There's one in reload too ("Discard obvious no-ops, even without -O"), but it seems to be acting the other way(!) If, for a machine where most insns clobber REG_CC, you instead emit with the clobber initially, you can have a tidier port: one define_subst:ed pattern instead of... How many is it with the only-expose-after-reload method (counting define_insn, define_split, possibly a define_expand too that wasn't there for cc0)? Two or three, per (original) insn with cc0? brgds, H-P