[LLVMdev] Vectors in structures

Renato Golin rengolin at systemcall.org
Tue Sep 21 09:33:19 PDT 2010


Second question:

I was checking NEON instructions this week and the vector types seem
to be inside structures. If vector types are considered proper types
in LLVM, why pack them inside structures?

That results in a lot of boilerplate code for converting and copying
the values (about 20 lines of IR) just to call a NEON instruction
that, in the end, will be converted into three instructions:

VLDR + {whatever} + VSTR

If the load and store are normally performed by one operation (I
assume it's the same on Intel and others), why bother with the
structure passing instead of just using load/store for vector types?

Also, the extra struct { [i8 x 8] } for memcopy seems also redundant.
If you're explicitly telling you want NEON (or whatever vector
instructions), why bother with compatibility?

-- 
cheers,
--renato

http://systemcall.org/

Reclaim your digital rights, eliminate DRM, learn more at
http://www.defectivebydesign.org/what_is_drm



More information about the llvm-dev mailing list