[llvm] [RISCV] Add support for getHostCPUFeatures using hwprobe (PR #94352)
Yangyu Chen via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 5 08:59:20 PDT 2024
cyyself wrote:
> > Do you offer an alternative/default implementation when __NR_riscv_hwprobe is not available, e.g., in docker containers?
>
> Is `/proc/cpuinfo` available in containers? If so, I can provide a fallback implementation by reading the `isa` field from this file.
I think it is a bad idea. Some vendor custom kernels, such as [t-head kernel](https://github.com/T-head-Semi/linux), regard `xtheadvector` as `v.` And a vast number of RISC-V devices still use these kernels.
https://github.com/llvm/llvm-project/pull/94352
More information about the llvm-commits
mailing list