[PATCH] parallel loop metadata

From: "Pekka Jääskeläinen" <pekka.jaaskelainen@tut.fi>
To: "Hal Finkel" <hfinkel@anl.gov>
Cc: "LLVM Developers Mailing List" <llvmdev@cs.uiuc.edu>, "Dan Gohman" <dan433584@gmail.com>
Sent: Tuesday, January 29, 2013 2:37:44 PM
Subject: Re: [PATCH] parallel loop metadata

> 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 :slight_smile:

Unless there is also some way to tell the compiler about those dependencies that I know about, this this is useless. Based on my experience, when a user says "ivdep" they are asserting no dependencies (known or unknown).

-Hal