[LLVMdev] Parallel Loop Metadata

Nadav Rotem nrotem at apple.com
Thu Feb 7 21:35:30 PST 2013


Hi Tobi, 

Thanks for reviewing the proposal. I imagine that it may also affects your parallelization work in Polly.
> 
> I am not sure if I am able to follow your reasoning. How could the -loop-vectorizer detect parallelism violations? I had the feeling that we introduce the llvm.loop meta-data for the case where we want to inform the loop vectorizer that it can assume the absence of dependences even though it can not prove their absence statically. Do you possibly mean that the -loop-vectorizer should in some way detect if the llvm.loop.parallel metadata is still correct?

Yes, the loop vectorizer can detect the kind of violations of the "llvm.loop.parallel" metadata that we are worried about.

> Given we go without llvm.mem meta-data. How would the -loop-vectorizer
> detect that the test case in parallel-loops-after-reg2mem.ll (see Pekkas patch) is not parallel any more even though the llvm.loop.parallel metadata is present?

We already detect this case right now. Its really easy to do.  The llvm.loop.parallel should only provide information that is not easily available within this compilation unit.  For example, assumption that the input pointers don't overlap, or that dynamic indices are within a certain range that allow us to vectorize. 


> The llvm.mem meta-data would give the necessary information that there was a new memory access introduced that was not covered by the llvm.loop.parallel meta-data. However, without this additional information, I have a hard time to see how you can verify if the llvm.loop.parallel metadata is still up to date.

Thanks,
Nadav



More information about the llvm-dev mailing list