[LLVMdev] Making GEP into vector illegal?

Duncan Sands baldrick at free.fr
Tue Oct 14 11:02:09 PDT 2008

Hi Mon Ping,

> I would like to make it illegal to GEP into a vector as I think it is  
> cleaner and more consistent.  Opinions?  Comments?

now that arrays are first class types, I think vectors should become
a subclass of ArrayType.  This would get rid of a lot of duplicated
code, and also fix a bunch of problems with vectors (eg: that sizes
are wrong; currently we think that a <n x i1> has length n bits, and
that a vector <n x x86_fp80> has length 80*n bits, both of which are
untenable).  From this point of view you have to allow GEP into a
vector; the conclusion I suppose is that codegen needs to replace
GEP+load or GEP+store with an extract or insert operation.



More information about the llvm-dev mailing list