LLVM TargetsBy Oleg / December 8, 2016
With =sys-devel/llvm-3.9.0 and =sys-devel/clang-3.9.0 new
LLVM_TARGETS USE_EXPAND introduced which is relying on llvm's build system configuration for a specific microarchitecture host targets support:
AMDGPUsupport for AMD & ATI graphic cards.
X86support for 32-bit, 64-bit and x32 arch. (AMD64 and EMT64, respectively)
BPFsupport for Berkeley Packet Filtering.
ARMsupport for ARM processors.
NVPTXsupport for NVIDIA cards.
By default following targets enabled:
- 32- and 64-bit arch profiles:
- arm profile:
Changing this settings is not recommended, however, if wanted, with
LLVM_TARGETS it is now possible to control what microarchitecture support LLVM will be configured with, depending on hardware. For example, with NVIDIA cards, it make sense to leave only
NVPTX targets. To achieve this, following changes in
For ATI cards this can confuse with AMDGPU video xorg drivers! While named same, this is a different thing. LLVM target support for all range of ATI cards named
Let's verify what targets enabled with default settings:
oleg2 ~ # llc -version LLVM (http://llvm.org/): LLVM version 3.9.0 Optimized build. Default target: x86_64-pc-linux-gnu Host CPU: westmere Registered Targets: amdgcn - AMD GCN GPUs bpf - BPF (host endian) bpfeb - BPF (big endian) bpfel - BPF (little endian) nvptx - NVIDIA PTX 32-bit nvptx64 - NVIDIA PTX 64-bit r600 - AMD GPUs HD2XXX-HD6XXX x86 - 32-bit X86: Pentium-Pro and above x86-64 - 64-bit X86: EM64T and AMD64 oleg2 ~ #