[LLVMdev] LoopVectorizer in OpenCL C work group autovectorization

Pekka Jääskeläinen pekka.jaaskelainen at tut.fi
Fri Jan 25 06:14:57 PST 2013

On 01/25/2013 04:00 PM, Hal Finkel wrote:
> Based on this experience, can you propose some metadata that would allow
> this to happen (so that the LoopVectorizer would be generally useful for
> POCL)? I suspect this same metadata might be useful in other contexts (such
> as implementing iteration-independence pragmas).

I cannot yet. In this hack I simply changed LoopVectorizer to assume
all loops the vectorizer sees are parallel (as the kernels I tried
didn't have loops inside) to see where the other potential
vectorization obstacles are.

I'm planning to try next an approach where I add metadata
to the loop header basic block that simply marks that the loop is parallel.
The loop vectorizer, when it sees such metadata in the loop can then
skip cross-iteration memory dependency checks. If you think this is a
dead-end, please let me know. Otherwise, I'll try and see how it


More information about the llvm-dev mailing list