generic vectors: how should they work?
David Edelsohn
dje@watson.ibm.com
Wed Sep 1 20:40:00 GMT 2004
>>>>> James E Wilson writes:
James> I think the biggest hole is the lack of an operator to extract an
James> element from a vector. If you want target independent code to extract
James> an element from a vector, then you have to use a union. However, once
James> you use a union, you no longer have vector operations, and can't use the
James> hardware vector instructions. Instead, what happens is that the vector
James> gets forced into a stack slot so we can index into it. Maybe we could
James> reuse the array syntax for this, e.g vector[0] to extract the first
James> element of the vector?
Honza submitted a patch to implement additional init/set/extract
expanders, but the second patch never was reviewed.
http://gcc.gnu.org/ml/gcc-patches/2004-01/msg00050.html
David
More information about the Gcc
mailing list