[LLVMdev] LLVM Loop Vectorizer puzzle
Pekka Jääskeläinen
pekka.jaaskelainen at tut.fi
Thu May 23 11:13:45 PDT 2013
On 05/23/2013 06:52 PM, Redmond, Paul wrote:
> I'm not even sure you would need the llvm.loop.parallel anymore since the
> vectorizer could just look to see if the loop id on a parallel_loop_access
> matches the loop id of the loop being vectorized.
>
> Does this make any sense?
Yes. However, I think you still need use the self-referencing
metadata trick or similar to make the metadata identifying a loop unique,
though (to avoid merging it with the metadata nodes with the same data). That
is, e.g., the llvm.mem.parallel_loop_access has to refer to *the* original
loop, not just any llvm.loop metadata with the same child metadata.
On dropping the llvm.loop.parallel metadata and relying only on checking the
parallel_loop_access to identify parallel loops, I'm not so sure. Does it
retain all the info for all cases? Let's say you have a parallel loop without
memory accesses but, say, a volatile inline asm block. In that case you do not
have a way to communicate that the iterations in the said loop can be executed
in any order if you cannot mark the loop itself parallel.
Regards,
--
--Pekka
More information about the llvm-dev
mailing list