[LLVMdev] [PATCH] parallel loop metadata

Pekka Jääskeläinen pekka.jaaskelainen at tut.fi
Tue Jan 29 12:37:44 PST 2013


On 01/29/2013 10:17 PM, Hal Finkel wrote:
> Will parallel always be synonymous with no_interiteration_dependencies? I'm
> sightly worried that 'parallel' seems too much like a directive, and we may
> want it to mean something else in the future.

I think the semantics of a "parallel loop" is:

   If my loop, I hereby state as "parallel", has loop-carried dependencies,
   I have made a programming mistake and you, the compiler, are free to
   punish me by producing undefined results.

We can add other metadata later on. E.g. "ivdep":

   My loop might have some dependencies I know you know about, and also
   some dependencies which are impossible (for you!) to analyze. The latter
   ones you can ignore as I know those are not real dependencies, but
   please do not ignore those I know you know about :)

I think the actual "strong" parallel loop semantics is more interesting
as it gives the most freedom and is not even a bit vague.

-- 
--Pekka




More information about the llvm-dev mailing list