[LLVMdev] LoopVectorizer in OpenCL C work group autovectorization

Hal Finkel hfinkel at anl.gov
Fri Jan 25 06:21:43 PST 2013


----- Original Message -----
> From: "Pekka Jääskeläinen" <pekka.jaaskelainen at tut.fi>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>, "Nadav Rotem" <nrotem at apple.com>
> Sent: Friday, January 25, 2013 8:14:57 AM
> Subject: Re: [LLVMdev] LoopVectorizer in OpenCL C work group	autovectorization
> 
> 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.

Okay, I understand.

> 
> 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
> works.

My point is that I specifically think that you should try it. I'm curious to see how what you come up with might apply to other use cases as well.

 -Hal

> 
> BR,
> --
> Pekka
> 




More information about the llvm-dev mailing list