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 8837D3858D20 for ; Tue, 20 Feb 2024 10:35:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8837D3858D20 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 8837D3858D20 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=1708425353; cv=none; b=iazQXpfH2udU0bo6i0jHJ3tbvJmHTzvQJxeNPoZqjweE0GPLFhjaSUNOcnJvUDDP+avwX+FPmxvBV8e1usM1H0u9/lXryCuY8BZJfuD6lHFo07EjnMVpdWyM5WBCW2B0mid2ZqqxyPYArONv7PxAj4HYf6U/v+aim23WAwFDjz4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708425353; c=relaxed/simple; bh=2pW+IN1N7l9W1S1C3y6DO6tUBbZYz3tc7byJxO+9OBI=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=wBoUYBMWAoYymGjL7hJpWPhBgZqFpDLJNrDMGSjGFIWwfqZxgeejFi6sJxPnKtK655aFGUSqLf9rfTh4N+JQW/3NsK3BIrcJIvDyIuMRVgUumvqEikWmceVbCVkogblKoShSi6Vxbj/HbtmMmEirY250FWq1EbL/ZQ0uGwPeOmQ= 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 41KA7Q6l019582; Tue, 20 Feb 2024 10:35:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : references : cc : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=W3++miL1Wa/7W/IuEkWajn8JURIdfdj/lmNRyP+3viE=; b=ABixVlhoRW6WBVgpEptSbW+uj03B8fSFZCuptYChI6ZvlUS7IR35fwquCeJPVnQNIVBW VJJwr1HJDk9Zw6l4M5ifcAJp/VEvh54pQyP+mNrC4EdDL2s9fFSM3at3FW8lmC45/CAC Ww8nVfdqYQG8TM8x2N9+nkR3P6O1BcILrmw/Tu/Dksqbo2jhNkKUa7xcdnMm7Tkuwgxx K/ZtBsx9TNCcLZtTAu7m+06SOgEm13kgzl72MixrdcPPyFvqptw6OJfLSdxoj4RF7BC1 aLzNYKrcyhWFMr2vzSFt5GSmYqKJvpyRRF51PTq9+9mjjRFrfTOexqZ8qe0ALHPmjdPn Wg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3wcquwd483-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Feb 2024 10:35:44 +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 41KAVCfc014515; Tue, 20 Feb 2024 10:35:44 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3wcquwd47r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Feb 2024 10:35:44 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 41K9jUa6031143; Tue, 20 Feb 2024 10:35:43 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3wb9bkq4vs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Feb 2024 10:35:43 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 41KAZckr61800900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Feb 2024 10:35:40 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F39172004B; Tue, 20 Feb 2024 10:35:37 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3010420040; Tue, 20 Feb 2024 10:35:36 +0000 (GMT) Received: from [9.200.49.43] (unknown [9.200.49.43]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 20 Feb 2024 10:35:35 +0000 (GMT) Message-ID: Date: Tue, 20 Feb 2024 18:35:34 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: Repost [PATCH 1/6] Add -mcpu=future Content-Language: en-US To: Michael Meissner References: <4a7b481d-8967-7f90-ad30-7df955552db8@linux.ibm.com> Cc: gcc-patches@gcc.gnu.org, Segher Boessenkool , Peter Bergner , David Edelsohn From: "Kewen.Lin" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: d7oALnbTDJH9K_NXSKI3GpyQecnQ3I9f X-Proofpoint-GUID: FmVHrm9ngyB45iQAnm9b1Pos00-pPaMC 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-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 bulkscore=0 impostorscore=0 priorityscore=1501 phishscore=0 mlxscore=0 spamscore=0 adultscore=0 suspectscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402200075 X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,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: 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: $ grep -r "define PROCESSOR_DEFAULT" gcc/config/rs6000/ 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=). BR, Kewen