This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why are vectors not arrays?


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]