[cxx-abi-dev] mangling vector types
David Vandevoorde
daveed at edg.com
Tue Nov 10 23:06:55 UTC 2009
On Nov 10, 2009, at 5:49 PM, Mark Mitchell wrote:
> Jason Merrill wrote:
>
>> to represent the type of vec in an element-based mangling, the
>> number of
>> elements would need to be expressed as I/sizeof(T), which is not more
>> compact.
>>
>> That, and the fact that vector_size takes a number of bytes rather
>> than
>> elements suggests that maybe the former is more natural for working
>> with
>> vector hardware.
>
> From a language-design point of view, I don't understand why we're
> using
> bytes there. It seems unnecessarily low-level. So, using a byte-
> based
> mangling seems consistent with GCC's language extension, but I'm not
> sure why that's a particularly good language extension. Of course, if
> it's a language extension that everyone has accepted and is therefore
> standard (not in the ISO sense, but in the everyone-does-it sense),
> then
> abstract goodness is irrelevant.
Actually, other extensions (e.g., OpenCL) deal with "number of
elements" instead of "number of bytes".
Could GCC introduce a new attribute "vector" such that __attribute
((vector(N))) is equivalent to __attribute((vector_size(N*sizeof
(element_type)))) and only allow the "vector" variant with dependent
signatures?
Daveed
More information about the cxx-abi-dev
mailing list