llvm-project
6a92538e - [RISCV] Make clang's -mcpu=help and -mtune=help accurate for RISC-V. (#243697)

Commit
1 day ago
[RISCV] Make clang's -mcpu=help and -mtune=help accurate for RISC-V. (#243697) Clang has multiple -mtune only CPU names like -mtune=sifive-7-series. These should not be printed by -mcpu=help. There also RV32 and RV64 only CPUs. Previously we used the -mcpu=help from LLVM's MC layer to print the names, but it doesn't have this granularity of information. This patch special cases RISC-V in the clang driver to get the lists from RISCVTargetParser. A new -print-supported-tune-cpus option is added to request the tune CPU list. -mtune=help aliases this option. The behavior for other targets is unchanged. Though X86 has similar issues and should probably use X86TargetParser. Assisted-by: Claude
Author
Parents
Loading