From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 8C9533858C55 for ; Tue, 20 Sep 2022 22:01:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8C9533858C55 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vnet.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vnet.ibm.com Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28KLxdxG004898; Tue, 20 Sep 2022 22:01:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding; s=pp1; bh=dmM75R4XLqFNKveoqqfrZ0o+USfjfvNyWS2cVJYHVa8=; b=r284gjwsTA1HMIXa2ihm8hya5FPYVCnHxVAKFAC82ExmmEKOmgpHOX/UEDLIeZ8H9FTw ref9ZVpAFVzVgdeKjaO7cp/tbZZ4Bp4fBN4gEJK65okF8SbFYwpnOUlkirA5Q8fvWNQs pzU81o4prCA3cYEIny/f/NXDN7lYtxQPo83smN7kJ2d8iUFsHZfw4oAnoc1shahYzbbY 5RWIx+m19XpZEK52ii/tdwrR1C5DKnTGf1Lg4MXgModGbG+6hrK4HdRmWWUX7Vp/17wL mjtz72SpQTx1GIfxHYAiAV4G71ustxmJvo/TgZWG2tFx2DwPae054gDv97TMEr3SXrh+ Fg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3jqnpkrenc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Sep 2022 22:01:56 +0000 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 28KM0C80008821; Tue, 20 Sep 2022 22:01:56 GMT Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3jqnpkren1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Sep 2022 22:01:56 +0000 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 28KLpRhb021445; Tue, 20 Sep 2022 22:01:55 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma02wdc.us.ibm.com with ESMTP id 3jn5v9eat7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Sep 2022 22:01:55 +0000 Received: from smtpav06.dal12v.mail.ibm.com ([9.208.128.130]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 28KM1sqT15467192 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Sep 2022 22:01:54 GMT Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9FBCB58059; Tue, 20 Sep 2022 22:01:54 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 161E058043; Tue, 20 Sep 2022 22:01:54 +0000 (GMT) Received: from sig-9-77-144-60.ibm.com (unknown [9.77.144.60]) by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP; Tue, 20 Sep 2022 22:01:53 +0000 (GMT) Message-ID: <318b813e51ef4c49a63281a146bfe8a4a9d1ce3c.camel@vnet.ibm.com> Subject: Re: [PATCH, rs6000] Eliminate TARGET_CTZ,TARGET_FCTIDZ,FCTIWUZ defines From: will schmidt To: Segher Boessenkool Cc: GCC patches , David Edelsohn , "Kewen.Lin" Date: Tue, 20 Sep 2022 17:01:53 -0500 In-Reply-To: <20220920211424.GA25951@gate.crashing.org> References: <2cc39864b6a4c52b948f86d54e5988e4d5a37ecb.camel@vnet.ibm.com> <20220920211424.GA25951@gate.crashing.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-18.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: XNx5XlLwt99l8CkIRnT6tHEIgYSp4KEg X-Proofpoint-ORIG-GUID: incP5_3CBS06BJmixLJ73dWTyQHAI0Ip X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-20_10,2022-09-20_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 adultscore=0 clxscore=1015 impostorscore=0 mlxlogscore=791 mlxscore=0 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209200131 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 2022-09-20 at 16:14 -0500, Segher Boessenkool wrote: > 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!) Yup, I actually developed these three (plus a bunch more) separately, but combined the first three for posting. I'll split them back out and repost after a bit. > > 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? Yes. I do have a change later in the (unposted) series to replace POPCNTD with POWER7, at a glance thats #17 down the line. In review I agree with your comment that the in-between changes aren't the best choices. I'll see about skipping the in-between values and going straight for POPCNTD->POWER7. I am looking at the TARGET_POWER10 notation as the target style, versus TARGET_P7, but I can go that direction if we think that would be preferred. Maybe it is since this is a retro-fix versus new. :-) > > 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). Absolutely.. I do have this mostly covered locally, I just need to refine a few parts. :-) > > > > * 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? willdo, thanks -Will > > > Segher