From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 9FBE13858C55 for ; Tue, 20 Sep 2022 21:15:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9FBE13858C55 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 28KLEQaR008381; Tue, 20 Sep 2022 16:14:26 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 28KLEPfk008380; Tue, 20 Sep 2022 16:14:25 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Tue, 20 Sep 2022 16:14:24 -0500 From: Segher Boessenkool To: will schmidt Cc: GCC patches , David Edelsohn , "Kewen.Lin" Subject: Re: [PATCH, rs6000] Eliminate TARGET_CTZ,TARGET_FCTIDZ,FCTIWUZ defines Message-ID: <20220920211424.GA25951@gate.crashing.org> References: <2cc39864b6a4c52b948f86d54e5988e4d5a37ecb.camel@vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2cc39864b6a4c52b948f86d54e5988e4d5a37ecb.camel@vnet.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi! On Mon, Sep 19, 2022 at 06:19:15PM -0500, will schmidt wrote: > This is the first of a batch of changes that eliminate a number > of define TARGET_foo entries we have collected over time. Good good :-) > TARGET_CTZ is defined as TARGET_MODULO, and has a low number > of uses. References to TARGET_CTZ should be safe to replace > with TARGET_MODULO throughout. No, please don't. This has nothing to with "modulo". If you want to say this is just whether we have ISA 3.0 or p9, make a new target macro for *that* and use that everywhere. This is a general issue, that will make the code much more sane if you can fix it! > TARGET_FCTIDZ is entirely unused, and safe to remove. Please make separate patches for separate issues. This makes it much easier to review, and MUCH easier for all other ways we need to handle it (backports, reverts, everything else). With Git it is *easier* to keep separate patches separate than it is to lump it all together. So, the trick is to keep things in separate commits during development already (and you will find more benefits doing that, too!) TARGET_FCTIDZ was never used, it always used TARGET_FCFID directly. The original PEM mistakenly said this insn is "64-bit only". This was fixed in ISA 2.01 . > TARGET_FCTIWUZ has a low number of uses, and can be directly > replaced with TARGET_POPCNTD. It is a p7 (ISA 2.06) insn. Please make a TARGET_P7 or such? In the current situation target macros like TARGET_POPCNTD are abused to mean either "can we use the popcntd insn", or to mean "can we use insn new on p7". Or sometimes something in between, or something in this general neighbourhood. It is never clear which is meant, which makes it very hard to untangle this. But thanks for trying! :-) (Don't let me dicsourage you btw, most is pretty straightforward). > * config/rs6000/rs6000.h (TARGET_CTZ): Replace with > TARGET_MODULO. Changelogs are indented with tabs, and this fits on one line. So, please make TARGET_P7 and such, and OPTION_MASKs for those in rs6000-cpus.def? Segher