Hello LLVM Devs,
I am starting my PhD on Automatic Parallelization for DSP and want to play with some ARM NEON intrinsics for a start. I spent the last three days trying to compile a version of LLVM that would allow me to compile sources that contain these intrinsics, but with no success.
In the process I found out that clang doesn’t support NEON (as per http://blog.llvm.org/2010/04/arm-advanced-simd-neon-intrinsics-and.html), but there has been at least some effort in adding it (https://www.codeaurora.org/patches/quic/llvm/32040/clang-Initial-Neon-support.patch).
I also tried compiling LLVM 2.9 + llvm-gcc but that failed too many times and I gave up. After some discussions with colleagues (notably Alberto Magni, who added OpenCL support to clang some time ago http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-November/012293.html) my current plan is to implement the ARM NEON intrinsics as a shared library, using attributes as in:
typedef float float4 attribute((ext_vector_type(4)));
or if that doesn’t work, I will try to implement the intrinsics in clang itself (not sure this is the best way of doing it).
Ideally, I want to be able to compile C code that includes ARM NEON intrinsics to other targets (TI processors, e.g.).
Suggestions, comments, and recommendations are very welcome.
Kind regards,
- Stan