[LLVMdev] [PATCH] parallel loop awareness to the LoopVectorizer
hfinkel at anl.gov
Mon Jan 28 10:00:11 PST 2013
----- Original Message -----
> From: "Pekka Jääskeläinen" <pekka.jaaskelainen at tut.fi>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "Nadav Rotem" <nrotem at apple.com>, "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
> Sent: Monday, January 28, 2013 11:36:21 AM
> Subject: Re: [LLVMdev] [PATCH] parallel loop awareness to the LoopVectorizer
> On 01/28/2013 06:51 PM, Hal Finkel wrote:
> > Is this sufficient to implement #pragma ivdep in clang?
> I'm not completely sure of this:
> "Note: The proven dependencies that prevent vectorization are not
> only assumed dependencies are ignored."
> Thus, there's a slight difference. It cannot be used to disable
> checking altogether (and just blame a sloppy programmer if there
> are dependencies), but it just converts the "unknown alias" to "no
> If there's a "yes" from the analyzer it still prevents the
> So, sort of a softened programmer-friendlier version of the
> The vagueness comes from that it depends on the intelligence
> of the dependency analysis implementation whether a dependency can be
> or not, doesn't it? Thus, #pragma ivdep with a non-existing
> loop dependence analyzer is equivalent to the semantics of the
And the user has no way of knowing which dependencies are proven and which are assumed, right? It seems like the user just needs to assume that nothing is proven ;) Nevertheless, based on this, we probably do need something with slightly weaker semantics for ivdep.
> Also, it's a bit unclear what is the real difference to the #pragma
> It similarly states: "However, if dependencies are proven, they are
> ignored." So conversely, if the compiler cannot prove a dependency
> some reason, they *are* ignored?
> OpenMP's 'omp for', on the other hand, can be used to mark a truly
> loop where this metadata could be used if one wants to parallelize
> loops using a finer-granularity mechanism than threads.
Agreed; we should make sure to incorporate this into the upcoming OpenMP support. The loops will be outlined, but the outlined pieces can then be marked with this 'parallel' metadata.
More information about the llvm-dev