[PATCH] D71124: [RISCV] support clang driver to select cpu

Kuan Hsu Chen (Zakk) via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 9 06:40:50 PDT 2020


khchen planned changes to this revision.
khchen marked an inline comment as done.
khchen added a comment.

BTW, this patch depends on D77030 <https://reviews.llvm.org/D77030>, which aim to avoid the forcing of any ProcessorModel to have `FeatureRVCHints` feature.
But if we decide to keep the `FeatureRVCHints`, I need to change implementation a little.



================
Comment at: clang/test/Driver/riscv-cpus.c:2
+// Check target CPUs are correctly passed.
+
+// RUN: %clang -target riscv32 -### -c %s 2>&1 -mcpu=rocket-rv32 | FileCheck -check-prefix=MCPU-ROCKETCHIP32 %s
----------------
asb wrote:
> I think for completeness this test should be validating the interaction of the ABI choosing logic with CPU selection as well. With the implemented logic I believe it should show that lp64d is selected for -mcpu=sifive-u54 and that -mcpu=sifive-u54 -mabi=lp64 will respect the ABI choice
okay, it makes sense to me, I will update this patch soon.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71124





More information about the cfe-commits mailing list