[PATCH] D140693: [Driver][RISCV] Adjust the priority between -mcpu, -mtune and -march

Kito Cheng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 29 23:05:14 PST 2022


kito-cheng added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5457
+  // RISC-V will handle -mcpu option in Clang::AddRISCVTargetArgs.
+  if (!Triple.isRISCV()) {
+    // Add the target cpu
----------------
craig.topper wrote:
> I wonder if we should stop getCPUName from calling `getRISCVTargetCPU` instead? Have you audited all callers of getCPUName?
That sounds a better way, that prevent us to auditing every caller of `getCPUName`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140693/new/

https://reviews.llvm.org/D140693



More information about the cfe-commits mailing list