[PATCH] parallel loop metadata
Hal Finkel
hfinkel at anl.gov
Tue Jan 29 11:59:54 PST 2013
----- Original Message -----
> From: "Dan Gohman" <dan433584 at gmail.com>
> To: "Pekka Jääskeläinen" <pekka.jaaskelainen at tut.fi>
> Cc: "CVS Commit Messages for LLVM repository" <llvm-commits at cs.uiuc.edu>
> Sent: Tuesday, January 29, 2013 12:22:44 PM
> Subject: Re: [PATCH] parallel loop metadata
>
>
> On Tue, 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.
>
>
>
> "Ignore assumed dependencies" is shaky semantics. I haven't seen
> anything explicitly spell out which dependencies a compiler is
> guaranteed to detect. How can users use such a directive safely in a
> loop which has dependencies? I understand that this is what icc's
> documentation says, but I'm wondering if there's a real motivation
> for this design other than blind compatibility.
I think that a user cannot really assume anything about which dependencies will be detected and which will not be.
>
>
> Also, hiding this "assumed dependencies" concept inside an API call
> named isParallel is confusing. Presumably there will also be a loop
> directive indicating that a loop is simply parallel, without this
> concept of assumed dependencies, and that's what I would otherwise
> assume a method named isParallel would test for.
+1
-Hal
>
>
> Dan
>
>
> _______________________________________________
> 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