[LLVMdev] Status of pre-legalize vector changes

Dan Gohman djg at cray.com
Mon Jun 11 12:41:28 PDT 2007


Hello,

Here's a quick update on where I'm at with the pre-legalize vector changes
I'm working on. I hope to have an updated patch ready to a few days, assuming
I don't get too busy with other projects going on. Here are some of the issues
I've come across so far.

Putting the table for extended ValueTypes in SelectionDAG seems quite involved.
There are a lot of places that use the MVT-namespace functions, and making
sure they all have access to a SelectionDAG object in order to use them is a
lot of changes. It's tempting to make the table be a ManagedStatic, in
VMCore/ValueTypes.cpp, not unlike the ManagedStatic objects in VMCore/Type.cpp,
for example.

Also, CopyToReg and CopyFromReg lowering/legalization rely on being able to
create vector-of-vector types. For example, an <8 x double> vector is bitcasted
to (effectively) <4 x <2 x double>> for x86, allowing EXTRACT_ELEMENT to pull
out whole legal vectors at a time instead of just individual elements, for
example. While my original patch made the extended ValueType table explicitly
hold vector element types and vector lengths, I had converted it to hold
Type*, and ran into problems because VectorType doesn't permit the element
types to be vectors. It seems unfortunate to give up using Type* just because
of these few cases, but at the moment I don't have any simpler alternatives.

Dan

-- 
Dan Gohman, Cray Inc.



More information about the llvm-dev mailing list