public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Michael Meissner <meissner@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/work158-future)] Make -mtune=future be the same as -mtune=power10. Date: Sat, 10 Feb 2024 05:48:07 +0000 (GMT) [thread overview] Message-ID: <20240210054807.1CEEB3858C98@sourceware.org> (raw) https://gcc.gnu.org/g:cf7d0b0193aedc04407c9bd1df879b050daf56c8 commit cf7d0b0193aedc04407c9bd1df879b050daf56c8 Author: Michael Meissner <meissner@linux.ibm.com> Date: Fri Feb 9 20:08:23 2024 -0500 Make -mtune=future be the same as -mtune=power10. 2024-02-09 Michael Meissner <meissner@linux.ibm.com> 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)
reply other threads:[~2024-02-10 5:48 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20240210054807.1CEEB3858C98@sourceware.org \ --to=meissner@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).