From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id 1CEEB3858C98; Sat, 10 Feb 2024 05:48:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1CEEB3858C98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707544087; bh=uM10hW1KhMX3ipR6jjhdJcxA3AOMpdzxSHxpeYloM7w=; h=From:To:Subject:Date:From; b=VKA22h5VZq74j6ololmPqcSFKTmh5dH5V5UngQCozLk/Mp6zgtnrzPDBeyrIieJKE SBxt2WFktH9EJm0vR9gNCAY91DTwTluZxmuAs3FUTl2Z/iheuzERQMmdOAqJDN39uc HLy7+yY31MKNS0jCl3Zn60ktPoTaj8dBAyOmenJw= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Michael Meissner To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/work158-future)] Make -mtune=future be the same as -mtune=power10. X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work158-future X-Git-Oldrev: 79dacb3056ea43f75968f1106d8832e01c5f8e42 X-Git-Newrev: cf7d0b0193aedc04407c9bd1df879b050daf56c8 Message-Id: <20240210054807.1CEEB3858C98@sourceware.org> Date: Sat, 10 Feb 2024 05:48:07 +0000 (GMT) List-Id: https://gcc.gnu.org/g:cf7d0b0193aedc04407c9bd1df879b050daf56c8 commit cf7d0b0193aedc04407c9bd1df879b050daf56c8 Author: Michael Meissner Date: Fri Feb 9 20:08:23 2024 -0500 Make -mtune=future be the same as -mtune=power10. 2024-02-09 Michael Meissner gcc/ * config/rs6000/rs6000.cc (rs6000_option_override_internal): Make -mtune=future become -mtune=power10. Diff: --- gcc/config/rs6000/rs6000.cc | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index 2064709aa977..5e5e677e1537 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -3756,16 +3756,40 @@ rs6000_option_override_internal (bool global_init_p) rs6000_isa_flags &= ~OPTION_MASK_POWERPC64; #endif + /* At the moment, we don't have explicit -mtune=future support. If the user + explicitly uses -mtune=future, give a warning. If not, use the power10 + tuning until future tuning is added. */ if (rs6000_tune_index >= 0) - tune_index = rs6000_tune_index; + { + enum processor_type cur_proc + = processor_target_table[rs6000_tune_index].processor; + + if (cur_proc == PROCESSOR_FUTURE) + { + warning (0, "%qs is not currently supported", "-mtune=future"); + rs6000_tune_index = rs6000_cpu_name_lookup ("power10"); + } + tune_index = rs6000_tune_index; + } else if (cpu_index >= 0) - rs6000_tune_index = tune_index = cpu_index; + { + enum processor_type cur_cpu + = processor_target_table[cpu_index].processor; + + rs6000_tune_index = tune_index + = (cur_cpu == PROCESSOR_FUTURE + ? rs6000_cpu_name_lookup ("power10") + : cpu_index); + } else { size_t i; enum processor_type tune_proc = (TARGET_POWERPC64 ? PROCESSOR_DEFAULT64 : PROCESSOR_DEFAULT); + if (tune_proc == PROCESSOR_FUTURE) + tune_proc = PROCESSOR_POWER10; + tune_index = -1; for (i = 0; i < ARRAY_SIZE (processor_target_table); i++) if (processor_target_table[i].processor == tune_proc)