[LLVMdev] Proposal for a new LLVM concurrency memory model
David Greene
dag at cray.com
Tue Apr 27 12:14:50 PDT 2010
On Tuesday 27 April 2010 13:59:25 Renato Golin wrote:
> On 27 April 2010 19:36, David Greene <dag at cray.com> wrote:
> > And it's not the disaster you fear. It's much easier for the compiler
> > to reason about threads it creates. It gets to control the model.
>
> I actually fear the well-defined thread implementation of the compiler
> interacting with chaotic threads from user code... ;)
If the user uses OpenMP or some other concurrent language model understood by
the compiler (UPC, CAF, etc.) everything is fine. If the user is mixing a
concurrency library like pthreads or MPI, it's up to the user to make sure the
code is correct. The compiler has to be conservative unless the user tells it
not to be via directive.
Yes, mixing thread models puts a lot of burden on the user. There's not much
we can do about that. Compilers can be taught some things about concurrency
libraries but there's a point of diminishing returns.
-Dave
More information about the llvm-dev
mailing list