<div dir="ltr"><div><div><div><div>Hi,<br><br></div><div>We have the same difficulties.<br></div><div><br></div>KNC (dubbed k1om in compiler utils) is a 64-bit device with 8087-compatible scalar arithmetics and non-standard vector arithmetics. More specifically, the widely used variant of 64-bit ABI implemented by LLVM involves xmm registers, while KNC does not have xmm-s and instead has zmm-s (512-bit wide). This makes standard 64-bit binaries you're trying to compile partially incompatible with KNC. So, even if you'd succeed to compile them somehow, they may fail to run (illegal instruction).<br>
<br></div>There are two possible solutions I know of.<br><br>First one - use KNC in 32-bit mode. KNC can run any 32-bit binary, if 32-bit C runtime is provided and device Linux kernel is compiled with CONFIG_IA32_EMULATION=y. This will not allow to use KNC's vector units, so it will be worth only for massive multi-threading. You do not loose much, because even if k1om-ready LLVM backend would exist, I doubt it could optimize for vector arithmetics well enough without man-year of testing/tuning the exiting vectorizer.<br>
<br></div>Second one - ask Intel to increase the priority of KNC support in LLVM. As far as I know, they do not plan official KNC support at all, only KNL (Landing, the next one). According to SC13, KNL will appear in 2015...<br>
<br></div>- D.<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/12/2 Frank Winter <span dir="ltr"><<a href="mailto:fwinter@jlab.org" target="_blank">fwinter@jlab.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
in the past few weeks we were able to confirm that the LLVM's JIT compiler can be used for our research project. This was confirmed for x86-64 architecture (with very good performance results by the way).<br>
<br>
Now, one of our real target architecture is the Intel Xeon Phi (KNC) accelerator in a native execution model. When cross-compiling LLVM (3.4 RC1) for Xeon Phi with CMake following the Intel guidelines (for general cross-compilation), the compilation process stops with<br>
<br>
[ 88%] Building CXX object lib/Target/X86/CMakeFiles/<u></u>LLVMX86CodeGen.dir/<u></u>X86ISelLowering.cpp.o<br>
[ 88%] Building CXX object lib/Target/X86/CMakeFiles/<u></u>LLVMX86CodeGen.dir/<u></u>X86InstrInfo.cpp.o<br>
[ 88%] Building CXX object lib/Target/X86/CMakeFiles/<u></u>LLVMX86CodeGen.dir/X86JITInfo.<u></u>cpp.o<br>
/tmp/icpcI3Tb9Aas_.s: Assembler messages:<br>
/tmp/icpcI3Tb9Aas_.s:48: Error: `movaps' is not supported on `k1om'<br>
/tmp/icpcI3Tb9Aas_.s:49: Error: `movaps' is not supported on `k1om'<br>
/tmp/icpcI3Tb9Aas_.s:50: Error: `movaps' is not supported on `k1om'<br>
/tmp/icpcI3Tb9Aas_.s:51: Error: `movaps' is not supported on `k1om'<br>
<br>
It seems LLVM JIT for KNC is new territory.Can the JIT be used on this architecture? Are there only small patches necessary to get this to work?<br>
<br>
Frank<br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>