[LLVMdev] Vectors in structures

Alasdair Grant Alasdair.Grant at arm.com
Tue Sep 21 17:40:03 PDT 2010


> They are defined as structures. The table in A.2 defines the exact
> structure names. There is a requirement to mangle them as those
> structures in A.2.1.

The mangling requirement doesn't require you to meet it in any
particular way as long as you end up with the right strings.
I.e. the mangling requirement places no requirements at all on
the implementation, outside of mangled names.

The controversial statement is where A.2 requires the user types to
map on to the __simd64 structures.  But that still isn't an argument
for wrapping.  This sentence might be significant:

"The structures have 64-bit alignment and map directly onto the
containerized vector fundamental data types."

So the structures map _directly_ on to the vector types - not on to
wrappers around the vector types.

> The fields of the structure may be different in
> this implementation, but the net effect here is that llvm-gcc and
> clang avoid having to magically recognize NEON types and substitute
> the proper mangling for them the way GCC does.

But mangling routines are self-contained and have to deal with this
sort of target issue anyway, e.g. gcc for ARM deals with 16-bit
floats as well as NEON types.  Saving 20 or so lines in a mangling
routine makes no sense as an argument for a particular implementation
strategy for arm_neon.h and a front end, let alone for inflating
bitcode files with lots of wrapping around vector operations.

Al

-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.




More information about the llvm-dev mailing list