David Greene
2010-Apr-27 18:36 UTC
[LLVMdev] Proposal for a new LLVM concurrency memory model
On Tuesday 27 April 2010 13:16:14 David Greene wrote:> On Tuesday 27 April 2010 12:16:26 Renato Golin wrote: > > I'm not against enhancing the compiler to that point, I just think > > that you're digging too deep and Balrog might show up unexpectedly. > > Thread issues can be daunting by themselves, automatically creating > > threaded code is a recipe to disaster, IMHO. > > Eventually all compilers are going to have to create threads. The > architecture roadmap demands it.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. Lots of compilers have been doing this for years. -Dave
Renato Golin
2010-Apr-27 18:59 UTC
[LLVMdev] Proposal for a new LLVM concurrency memory model
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... ;) cheers, --renato http://systemcall.org/ Reclaim your digital rights, eliminate DRM, learn more at http://www.defectivebydesign.org/what_is_drm
David Greene
2010-Apr-27 19:14 UTC
[LLVMdev] Proposal for a new LLVM concurrency memory model
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
Maybe Matching Threads
- [LLVMdev] Proposal for a new LLVM concurrency memory model
- [LLVMdev] Proposal for a new LLVM concurrency memory model
- [LLVMdev] Proposal for a new LLVM concurrency memory model
- [LLVMdev] Proposal for a new LLVM concurrency memory model
- [LLVMdev] Proposal for a new LLVM concurrency memory model