public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work158-future)] Make -mtune=future be the same as -mtune=power10.
@ 2024-02-10 5:48 Michael Meissner
0 siblings, 0 replies; only message in thread
From: Michael Meissner @ 2024-02-10 5:48 UTC (permalink / raw)
To: gcc-cvs
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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-10 5:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-10 5:48 [gcc(refs/users/meissner/heads/work158-future)] Make -mtune=future be the same as -mtune=power10 Michael Meissner
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).