[PATCH] parallel loop metadata

Nadav Rotem nrotem at apple.com
Tue Jan 29 09:29:09 PST 2013


Hi Pekka, 

I am okay with the first part (of adding lvm.loop.ignore_assumed_deps), but I am not sure why we need the second one. 

Adding metadata to every single (memory) instructions sounds fragile to me, and I am not sure that I understand the motivation. 

Thanks,
Nadav

On Jan 29, 2013, at 8:38 AM, Pekka Jääskeläinen <pekka.jaaskelainen at tut.fi> wrote:

> 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
> <parallel-loop-metadata.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list