[all-commits] [llvm/llvm-project] 5e2d8a: [RISCV] Remove getCPUFeaturesExceptStdExt.

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Apr 11 10:42:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5e2d8a35288802f94df8c60513e7a835b27e621d
      https://github.com/llvm/llvm-project/commit/5e2d8a35288802f94df8c60513e7a835b27e621d
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-04-11 (Tue, 11 Apr 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/Arch/RISCV.cpp
    M clang/test/Driver/riscv-cpus.c
    M llvm/include/llvm/TargetParser/RISCVTargetParser.h
    M llvm/lib/TargetParser/RISCVTargetParser.cpp

  Log Message:
  -----------
  [RISCV] Remove getCPUFeaturesExceptStdExt.

This function was used to force +64bit or -64bit into the feature
string basd on -mcpu.

It's not entirely clear to me why this was needed.  This informationo
is redundant with the triple. RISCVTargetInfo::initFeatureMap
independently recomputes it from the triple for the feature map.

It is ultimately needed in the backend, but that should be handled
by RISCVSubtarget processing the CPU name.

Differential Revision: https://reviews.llvm.org/D147978


  Commit: 88d6311982557acf2dd04ce101aca077ac311012
      https://github.com/llvm/llvm-project/commit/88d6311982557acf2dd04ce101aca077ac311012
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-04-11 (Tue, 11 Apr 2023)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticDriverKinds.td
    M clang/lib/Driver/ToolChains/Arch/RISCV.cpp
    M clang/test/Driver/riscv-cpus.c

  Log Message:
  -----------
  [RISCV] Print a better error message when a rv32 CPU is used on rv64 and vice versa.

Instead of rejecting the CPU outright with no information, try
to diagnose that it doesn't match the triple.

Differential Revision: https://reviews.llvm.org/D147986


Compare: https://github.com/llvm/llvm-project/compare/393a1c3b4fcd...88d631198255


More information about the All-commits mailing list