Global Values Vectorization - Take 3

Renato Golin renato.golin at linaro.org
Mon Feb 18 10:37:44 PST 2013


Hi Arnold, Nadav, Hal,

This patch works with the tests attached (the examples I had before), and
it just vectorize the most conservative one, for now. Let me know if you
can think of other examples, so I can test and include in my list of tests.

Considerations:

1. I'm using std::multimap, which Hal found to be not as efficient as
DenseMap<SmallVector<>>. I might start using them, as soon as I'm sure this
algorithm makes sense.

2. I'm storing the load/store instruction with both ReadWrites and
WriteObjects. This is ineffective, but was a way to make sure I got the
right stores when dealing with the right underlying objects (since I'll be
iterating through them all). I'll re-think about this relationship, and try
to find the most cost-effective (space-wise) solution.

3. I'm getting max vector register width for the vectorized access size,
which might not be the best thing, but since the cost model is the one that
calculates the vectorization factor, and we only create it *after* the
legalization has finished, I didn't want to wrap initializaitons around,
nor to duplicate code. Ideas welcome.

4. BasicAA seems to be getting it right, when I pass the strides and access
sizes, and it's not being too optimistic.

Please, be aware that this patch is still not good for merge, I'm just
looking for a confirmation that it does make sense.

I don't want to add any RT checks for this first patch, but we'll need
something like that for later...

Thanks!
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130218/79444dcc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: global_vectorize.patch
Type: application/octet-stream
Size: 26913 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130218/79444dcc/attachment.obj>


More information about the llvm-commits mailing list