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

Kuan Hsu Chen (Zakk) via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 03:21:16 PDT 2020


khchen added a comment.

In D71124#2012090 <https://reviews.llvm.org/D71124#2012090>, @kito-cheng wrote:

> Another proposal for -mcpu and -mtune:
>
> Decoupling the -mcpu and -mtune option, -mcpu only accept concrete CPU, and -mtune for micro-arch/pipeline model, they accept different option set.
>
> e.g.
>  -mcpu=sifive-e24 # Imply -march=rv32imafc -mtune=sifive-2-series
>  -mtune=sifive-2-series # no effect on arch
>  -mtune=rocket # no effect on arch
>
> So -mcpu=rocket is invalid, since it's micro-arch/pipeline model only,
>  and -mtune=sifive-e24 is invalid too, because it's CPU not a micro-arch.


I agree this is better proposal but clang treats -mtune and -mcpu as same options now...
ex. https://github.com/llvm-mirror/clang/blob/master/include/clang/Driver/Options.td#L2751-L2752


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71124





More information about the llvm-commits mailing list