From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id F1A783858D20 for ; Wed, 21 Feb 2024 07:19:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F1A783858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F1A783858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708499983; cv=none; b=P2bFWpRmt23fw/EzgwniRoTRrTUI3lffAlAgnrfMg7TbHq/EjbdOEN5/nxzaohtsGxmrvuS+fEj54DunI7cWSZ86JbaxzcKoOTHA86pJNk9u7i89aacTkW9ML8PdEzYnUFxkoDFAcxpEt14j6V+0WpMkX2sAX4p6+ny1nO/qAkI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708499983; c=relaxed/simple; bh=c0/2+Oly3vwTnOq3yAkKfuQASUSisg5g4Gd50L6+0yc=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=Tl9D/iHmHwAPhVdBpra4/JTgHB7bwaOWr7QbnjKD5zQ2aL7/ZqltwxelhRi8o7m1YOIjNB7QcVXl7ID1sHg4+O4JgbX3k9LV1IEKSEkgWVpiXg3aHEb/fnVn6L0sLwnZNT3acZ84ZLD1lPtz96fJWByfNMhHeUq/ZH9AcZRPVV4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 41L72ZF0021874; Wed, 21 Feb 2024 07:19:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=VpN9FL4zawRrAv0j+JLfKqxk8A3m49p2fjarglCLOPA=; b=Z+Jp4mCGE5O8+mcffTdQyk1cCx7ZukpGCahVJC6oV2sQYZVNuUTv1vg8s6/kFj/jf4cS bStGaQvYtguCC5e32b3LuuhN3cozGXO9ciTrRuq+OwRzaJHrxH7T5toojDJcnB/fpQDw 25j0fYqjzT7D/l4C5uvIvjnBIh613Sebvq42vfKMnJuB1FrVo4eIhMmXLa/Tzw6p8n4c ZZmHFQpyjR0pnIIB+m0Z4TllP+KNpYJsdIZwYNeN68n5Fojp8+xTGDOICzKH6k6+5ujZ TxivHYAYi7CVjzFIGB3evekQY7GA4gWpQst1J/lh0enRpMyWnqVwJZ28mxTZQVscfY6K 2w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3wdcearbjg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Feb 2024 07:19:40 +0000 Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 41L73JtP022944; Wed, 21 Feb 2024 07:19:39 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3wdcearbj4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Feb 2024 07:19:39 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 41L4Kgbc003615; Wed, 21 Feb 2024 07:19:39 GMT Received: from smtprelay02.dal12v.mail.ibm.com ([172.16.1.4]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3wb74tntxg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 21 Feb 2024 07:19:39 +0000 Received: from smtpav05.wdc07v.mail.ibm.com (smtpav05.wdc07v.mail.ibm.com [10.39.53.232]) by smtprelay02.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 41L7JaBw35062340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 21 Feb 2024 07:19:38 GMT Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DCBC558061; Wed, 21 Feb 2024 07:19:35 +0000 (GMT) Received: from smtpav05.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2AFA258043; Wed, 21 Feb 2024 07:19:35 +0000 (GMT) Received: from cowardly-lion.the-meissners.org (unknown [9.61.50.111]) by smtpav05.wdc07v.mail.ibm.com (Postfix) with ESMTPS; Wed, 21 Feb 2024 07:19:35 +0000 (GMT) Date: Wed, 21 Feb 2024 02:19:33 -0500 From: Michael Meissner To: "Kewen.Lin" Cc: Michael Meissner , gcc-patches@gcc.gnu.org, Segher Boessenkool , Peter Bergner , David Edelsohn Subject: Re: Repost [PATCH 1/6] Add -mcpu=future Message-ID: Mail-Followup-To: Michael Meissner , "Kewen.Lin" , gcc-patches@gcc.gnu.org, Segher Boessenkool , Peter Bergner , David Edelsohn References: <4a7b481d-8967-7f90-ad30-7df955552db8@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-TM-AS-GCONF: 00 X-Proofpoint-GUID: cYxkLvMJiU02SQJg3RPFyc-Czr0h25Hi X-Proofpoint-ORIG-GUID: 1PBVG-JqD9ZlH3tx8WIAcDFofxeh_3wh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-20_06,2024-02-20_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 phishscore=0 priorityscore=1501 spamscore=0 suspectscore=0 impostorscore=0 mlxscore=0 mlxlogscore=930 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402210055 X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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, Feb 20, 2024 at 06:35:34PM +0800, Kewen.Lin wrote: > Hi Mike, > > Sorry for late reply (just back from vacation). > > on 2024/2/8 03:58, Michael Meissner wrote: > > On Wed, Feb 07, 2024 at 05:21:10PM +0800, Kewen.Lin wrote: > >> on 2024/2/6 14:01, Michael Meissner wrote: > >> Sorry for the possible confusion here, the "tune_proc" that I referred to is > >> the variable in the above else branch: > >> > >> enum processor_type tune_proc = (TARGET_POWERPC64 ? PROCESSOR_DEFAULT64 : PROCESSOR_DEFAULT); > >> > >> It's either PROCESSOR_DEFAULT64 or PROCESSOR_DEFAULT, so it doesn't have a > >> chance to be PROCESSOR_FUTURE, so the checking "tune_proc == PROCESSOR_FUTURE" > >> is useless. > > > > PROCESSOR_DEFAULT can be PROCESSOR_FUTURE if somebody configures GCC with > > --with-cpu=future. While in general it shouldn't occur, it is helpful to > > consider all of the corner cases. > > But it sounds not true, I think you meant TARGET_CPU_DEFAULT instead? > > On one local ppc64le machine I tried to configure with --with-cpu=power10, > I got {,OPTION_}TARGET_CPU_DEFAULT "power10" but PROCESSOR_DEFAULT is still > PROCESSOR_POWER7 (PROCESSOR_DEFAULT64 is PROCESSOR_POWER8). I think these > PROCESSOR_DEFAULT{,64} are defined by various headers: Yes, I was mistaken. You are correct TARGET_CPU_DEFAULT is set. I will change the comments. > gcc/config/rs6000/aix71.h:#define PROCESSOR_DEFAULT PROCESSOR_POWER7 > gcc/config/rs6000/aix71.h:#define PROCESSOR_DEFAULT64 PROCESSOR_POWER7 > gcc/config/rs6000/aix72.h:#define PROCESSOR_DEFAULT PROCESSOR_POWER7 > gcc/config/rs6000/aix72.h:#define PROCESSOR_DEFAULT64 PROCESSOR_POWER7 > gcc/config/rs6000/aix73.h:#define PROCESSOR_DEFAULT PROCESSOR_POWER8 > gcc/config/rs6000/aix73.h:#define PROCESSOR_DEFAULT64 PROCESSOR_POWER8 > gcc/config/rs6000/darwin.h:#define PROCESSOR_DEFAULT PROCESSOR_PPC7400 > gcc/config/rs6000/darwin.h:#define PROCESSOR_DEFAULT64 PROCESSOR_POWER4 > gcc/config/rs6000/freebsd64.h:#define PROCESSOR_DEFAULT PROCESSOR_PPC7450 > gcc/config/rs6000/freebsd64.h:#define PROCESSOR_DEFAULT64 PROCESSOR_POWER8 > gcc/config/rs6000/linux64.h:#define PROCESSOR_DEFAULT PROCESSOR_POWER7 > gcc/config/rs6000/linux64.h:#define PROCESSOR_DEFAULT64 PROCESSOR_POWER8 > gcc/config/rs6000/rs6000.h:#define PROCESSOR_DEFAULT PROCESSOR_PPC603 > gcc/config/rs6000/rs6000.h:#define PROCESSOR_DEFAULT64 PROCESSOR_RS64A > gcc/config/rs6000/vxworks.h:#define PROCESSOR_DEFAULT PROCESSOR_PPC604 > > , and they are unlikely to be updated later, no? > > btw, the given --with-cpu=future will make cpu_index never negative so > > ... > else if (cpu_index >= 0) > rs6000_tune_index = tune_index = cpu_index; > else > ... > > so there is no chance to enter "else" arm, that is, that arm only takes > effect when no cpu/tune is given (neither -m{cpu,tune} nor --with-cpu=). Note, this is existing code. I didn't modify it. If we want to change it, we should do it as another patch. -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meissner@linux.ibm.com