[LLVMdev] Vectorization: Next Steps
Duncan Sands
baldrick at free.fr
Fri Feb 3 00:49:30 PST 2012
Hi Hal,
> As some of you may know, I committed my basic-block autovectorization
> pass a few days ago. I encourage anyone interested to try it out (pass
> -vectorize to opt or -mllvm -vectorize to clang) and provide feedback.
> Especially in combination with -unroll-allow-partial, I have observed
> some significant benchmark speedups, but, I have also observed some
> significant slowdowns.
codegen for vector constructs is not always that great in my experience.
It could be that your vectorizer is doing the right thing, and it's
codegen that needs to be improved. For example when I use the GCC
autovectorizer I often see LLVM codegen unnecessarily scalarizing the
vector code. Did you try to analyse these slowdowns?
Ciao, Duncan.
I would like to share my thoughts, and hopefully
> get feedback, on next steps.
>
> 1. "Target Data" for vectorization - I think that in order to improve
> the vectorization quality, the vectorizer will need more information
> about the target. This information could be provided in the form of a
> kind of extended target data. This extended target data might contain:
> - What basic types can be vectorized, and how many of them will fit
> into (the largest) vector registers
> - What classes of operations can be vectorized (division, conversions /
> sign extension, etc. are not always supported)
> - What alignment is necessary for loads and stores
> - Is scalar-to-vector free?
More information about the llvm-dev
mailing list