Skip to content

Commit

Permalink
Patch [5 of 7]: Make -mtune=future be the same as -mtune=power10.
Browse files Browse the repository at this point in the history
This patch makes -mcpu=future act like -mcpu=power10 in terms of tuning.  If
future patches changes the tuning, then this patch woucl be changed to use the
new tuning information.  Until there is different tuning, this patch does not
allow the user to explicitly use -mtune=future.

2024-02-14  Michael Meissner  <meissner@linux.ibm.com>

gcc/

	* config/rs6000/rs6000.cc (rs6000_option_override_internal): Make
	-mtune=future become -mtune=power10.
  • Loading branch information
Michael Meissner authored and ouuleilei-bot committed Feb 14, 2024
1 parent c2d62cd commit 6617437
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions gcc/config/rs6000/rs6000.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3737,16 +3737,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)
Expand Down

0 comments on commit 6617437

Please sign in to comment.