[PATCH] parallel loop metadata

Pekka Jääskeläinen pekka.jaaskelainen at tut.fi
Tue Jan 29 08:38:40 PST 2013


Hi,

The attached patch implements a simple mechanism to mark parallel
loops.

It uses two types of metadata:
llvm.loop.ignore_assumed_deps attached to the loop latch's
branch instruction and llvm.mem.parallel_loop_access attached to
all of the parallel loop's memory accesses.

Loop::isParallel() checks these. If llvm.loop.ignore_assumed_deps
is found, it ensures all the memory instructions inside the
loop body have the llvm.mem.parallel_loop_access attached before
returning true.

Test included for the LoopVectorizer that uses this info to parallelize
a strange looking loop which it otherwise skips completely.

Also included is a test that the parallel loop is converted to a
non-vectorizable one after reg2mem adds new memory instructions (without
the llvm.mem.parallel_loop_access metadata).

-- 
Pekka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: parallel-loop-metadata.patch
Type: text/x-patch
Size: 8754 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130129/105ff6a7/attachment.bin>


More information about the llvm-commits mailing list