[LLVMdev] Auto-Vectorization in LLVM

Tobias Grosser grosser at fim.uni-passau.de
Sat May 8 02:04:05 PDT 2010


On 05/06/10 10:40, Renato Golin wrote:
> On 6 May 2010 05:34, Chris Lattner<clattner at apple.com>  wrote:
>> On May 5, 2010, at 1:01 PM, Rajkishore Barik wrote:
>>> I would also like to know if there is any progress/future plans to
>>> include this
>>> in the main trunk?
>>
>> Unfortunately, nothing came of this project AFAIK, maybe Devang knows more.
>
> I looked for it and couldn't find any, too. I found some
> alias/dependency analysis inside loops, but nothing actively trying to
> merge instructions.
>
> WRT progress/plans, there is the Poly project
> (http://wiki.llvm.org/Polyhedral_optimization_framework) that is an
> external representation to LLVM and could make much easier to map
> dependencies and leave the road open for auto-vec, but again, nothing
> on that direction has been done, too. Tobias and Ether should know
> more on that.

Yes, as ether said we believe polly will simplify auto-vectorization a 
lot. With the help of polyhedral transformations it will be possible to 
generate and annotate vector parallel loops. These can afterwords be 
vectorized easily.

I put an example on the wiki:
http://wiki.llvm.org/Polyhedral_optimization_framework#2.3._Vectorization

At the moment polly starts to become useful, but needs probably this 
summer to become mature. During the last weeks the first very simple 
tests started to work.
At the moment we can detect matrix multiplication, create polyhedral 
information and code generate it again.
Exporting the test case, optimizing it, and importing will be done in 
the next weeks.

As soon as this is done, we can show impressive results for matmult and 
we compile the llvm-testsuite without crashing I will write a mail on 
the mailing list. Anybody who wants try polly earlier will probably 
trigger some unimplemented stuff. However you could try anyways. ;-) I 
will glad to help you with it.

@Andreas:
Do you believe your vectorization would work on dependence free loops? 
In that case, I would love to try your pass later. Scheduling it after 
polly (that created the vector parallel loops), should create vectorized 
loops easily.

Tobi



More information about the llvm-dev mailing list