[LLVMdev] parallel loop metadata question

Humphreys, Jonathan j-humphreys at ti.com
Thu May 1 15:49:50 PDT 2014


I'm looking at pocl and the loop based metadata llvm.loop and llvm.mem.parallel_loop_access, and am hoping someone familiar with it can help with my understanding.

First, I understand this to be true:
- llvm.loop doesn't by itself communicate anything.  It is used by other metadata to anchor that metadata to the loop.
- if all memory instructions in a loop have the llvm.mem.parallel_loop_access metadata referencing the loop's llvm.loop metadata, then the loop can be considered 'parallel'.

Here's where I have a question:
- if not all memory instructions in a loop have this metadata, can the compiler still infer that the instructions having this metadata do not have any loop carried dependencies with any other instruction also having this metadata (for the common loops referenced by the metadata)?

If so, it would be nice if we documented the actual meaning of llvm.mem.parallel_loop_access as such.  And the conclusion that a loop is 'parallel' if all its memory instructions have this metadata would be a natural consequence of that meaning.

This will allow us to potentially vectorize and/or software pipeline large portions of loops even when some transformation introduces a memory operation whose dependence effects are unknown.

Thanks
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140501/5a0b183b/attachment.html>


More information about the llvm-dev mailing list