[LLVMdev] ARM NEON intrinsics in clang

Stanislav Manilov S.Z.Manilov at sms.ed.ac.uk
Thu Sep 26 04:22:25 PDT 2013


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


-- 
Stan Manilov
1st year Ph.D. student
2013 Graduate in B.Sc. Computer Science and Mathematics
The University of Edinburgh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130926/b31b3f2b/attachment.html>


More information about the llvm-dev mailing list