[LLVM-C] Add LLVMGetHostCPU{Name,Features}.
authorwhitequark <whitequark@whitequark.org>
Wed, 11 Apr 2018 22:40:42 +0000 (22:40 +0000)
committerwhitequark <whitequark@whitequark.org>
Wed, 11 Apr 2018 22:40:42 +0000 (22:40 +0000)
commit1ae61a612633331ba2bc6a13fc9703de5590fa29
tree149ea6c8dc68e7bf2c5ea3d87711eedab9c77a41
parenta557852719821f82025fe876607880058799c8af
[LLVM-C] Add LLVMGetHostCPU{Name,Features}.

Without these functions it's hard to create a TargetMachine for
Orc JIT that creates efficient native code.

It's not sufficient to just expose LLVMGetHostCPUName(), because
for some CPUs there's fewer features actually available than
the CPU name indicates (e.g. AVX might be missing on some CPUs
identified as Skylake).

Differential Revision: https://reviews.llvm.org/D44861

llvm-svn: 329856
llvm/include/llvm-c/TargetMachine.h
llvm/lib/Target/TargetMachineC.cpp