Why are vectors not arrays?
Richard Henderson
rth@redhat.com
Sat Apr 10 00:47:00 GMT 2004
On Fri, Apr 09, 2004 at 10:29:25AM -0400, Daniel Berlin wrote:
> >We have vector extensions which support addition, subtraction, and so
> >forth, which is great, but is there any simple way to actually get
> >values in and out of vectors?
A union?
> No, and there should be.
Why?
What we definitely do NOT want is for the bits of a vector to
be considered lvalues. We do NOT want to be able to take their
address.
Why?
Because that means all sorts of nasty business when it comes
to figuring out whether or not we can actually use hw vector
types and operations. It means that suddenly all vector
variables are aggregates and not a queer sort of scalar. Which
means that SSA optimization will SUCK because they can't be
renamed. At least without rewriting a lot of stuff. And for
what benefit?
Without a REALLY good reason I oppose adding lvalue accessors
to vector types. I'm rather annoyed that we have them for
complex types as it is.
r~
More information about the Gcc
mailing list