[all-commits] [llvm/llvm-project] 9b2e09: [PowerPC] Recognize long CPU name for -mtune in Clang

Nemanja Ivanovic via All-commits all-commits at lists.llvm.org
Thu Mar 2 23:19:08 PST 2023


  Branch: refs/heads/release/16.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 9b2e09e9fb1aa3bbe3668d7cc585188a3014d1b9
      https://github.com/llvm/llvm-project/commit/9b2e09e9fb1aa3bbe3668d7cc585188a3014d1b9
  Author: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>
  Date:   2023-03-02 (Thu, 02 Mar 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/Arch/PPC.cpp
    M clang/lib/Driver/ToolChains/Arch/PPC.h
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/Driver/ppc-cpus.c

  Log Message:
  -----------
  [PowerPC] Recognize long CPU name for -mtune in Clang

There are two ways of specifying a CPU on PowerPC:
power<N> and pwr<N>. Clang/LLVM traditionally
supports the latter and Clang replaces the former
with the latter when passing it to the back end for
the -mcpu= option. However, when the -mtune= option
was introduced, this replacement was not implemented for it.

This leaves us in an inconsistent state of accepting
both forms for -mcpu= and and only the latter for
-mtune=. Furthermore, it leaves us incompatible with
GCC which only understands the power<N> version for
both options.

This patch just adds the same handling for the long
names for -mtune= as already exists for -mcpu=.

Differential revision: https://reviews.llvm.org/D144967

(cherry picked from commit 59cd692454c9430f0fb77ca14b65cb9afcfe2776)




More information about the All-commits mailing list