On Wed, Jul 25, 2012 at 1:20 AM, Walter Bright <[email protected]> wrote: > However, I do understand that the D spec does allow a compiler to do this.
As far as I know, LLVM (and thus LDC), already does this all over the place today. LLVM's definition of volatile (at the IR level), by the way, is: »The optimizers must not change the number of volatile operations or change their order of execution relative to other volatile operations. The optimizers may change the order of volatile operations relative to non-volatile operations.« > Even though shared is not implemented at the low level, I suggest using it > anyway as it currently does work (with or without shared). The main problem with shared is that it isn't clear what it is supposed to do once it's implemented – we don't even have a memory model to _express_ this yet. x86 might be fairly docile in that regard, other architectures are not. David _______________________________________________ dmd-internals mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/dmd-internals
