The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "News:LLVM Targets"
(7 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
|News Category=General | |News Category=General | ||
|Author=Oleg | |Author=Oleg | ||
|Publication Status= | |Publication Status=Published | ||
|Publication Date=2016/12/08 | |Publication Date=2016/12/08 | ||
}} | }} | ||
With =sys-devel/llvm-3.9.0 new <code>LLVM_TARGETS</code> USE_EXPAND introduced which is relying on llvm's build system configuration for a specific microarchitecture host targets support | With =sys-devel/llvm-3.9.0 and =sys-devel/clang-3.9.0 new <code>LLVM_TARGETS</code> USE_EXPAND introduced which is relying on llvm's build system configuration for a specific microarchitecture host targets support: | ||
* <code>AMDGPU</code> support for AMD & ATI graphic cards. | * <code>AMDGPU</code> support for AMD & ATI graphic cards. | ||
* <code>X86</code> support for 32-bit, 64-bit and x32 arch. (AMD64 and EMT64, respectively) | * <code>X86</code> support for 32-bit, 64-bit and x32 arch. (AMD64 and EMT64, respectively) | ||
* <code>BPF</code> support for | * <code>BPF</code> support for Berkeley Packet Filtering. | ||
* <code>ARM</code> support for ARM processors. | * <code>ARM</code> support for ARM processors. | ||
* <code>NVPTX</code> support for NVIDIA cards. | * <code>NVPTX</code> support for NVIDIA cards. | ||
Line 18: | Line 18: | ||
* arm profile: <code>ARM</code> and <code>BPF</code> | * arm profile: <code>ARM</code> and <code>BPF</code> | ||
Changing this settings is not recommended, however, if wanted, with <code>LLVM_TARGETS</code> 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 <code>NVPTX</code> targets. To achieve this, following changes in <code>/etc/portage/make.conf</code> needed: | |||
{{file|name=/etc/portage/make.conf|desc=Excerpt of make.conf with NVIDIA cards|body= | {{file|name=/etc/portage/make.conf|desc=Excerpt of make.conf with NVIDIA cards|body= | ||
LLVM_TARGETS=" | LLVM_TARGETS="NVPTX" | ||
}} | |||
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 <code>AMDGPU</code> | |||
{{file|name=/etc/portage/make.conf|desc=Excerpt of make.conf with ATI cards|body= | |||
LLVM_TARGETS="AMDGPU" | |||
}} | |||
Let's verify what targets enabled with default settings: | |||
{{console|body= | |||
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 ~ # | |||
}} | }} |
Latest revision as of 14:51, December 8, 2016
LLVM Targets
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:
AMDGPU
support for AMD & ATI graphic cards.X86
support for 32-bit, 64-bit and x32 arch. (AMD64 and EMT64, respectively)BPF
support for Berkeley Packet Filtering.ARM
support for ARM processors.NVPTX
support for NVIDIA cards.
By default following targets enabled:
- 32- and 64-bit arch profiles:
X86
,AMDGPU
,BPF
andNVPTX
- arm profile:
ARM
andBPF
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 /etc/portage/make.conf
needed:
/etc/portage/make.conf
- Excerpt of make.conf with NVIDIA cardsLLVM_TARGETS="NVPTX"
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 AMDGPU
/etc/portage/make.conf
- Excerpt of make.conf with ATI cardsLLVM_TARGETS="AMDGPU"
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 ~ #