On Sunday, 5 April 2015 at 15:58:17 UTC, Iain Buclaw wrote:
--- Comment #24 from Iain Buclaw <ibuc...@gdcproject.org> ---
Compiler reordering should never mess up order of program logic
to variables/objects where changes are considered 'observable'
(eg, on shared data). Most re-ordering/memoization happens on
'non-observable' data such as local variables, thread-local
storage.
However, that certainly doesn't stop certain C-like behaviours
from occuring in the optimiser. Such include crash-inducing
operations like divide by zero may be pushed forward to occur
before volatile load/reads or actions with side-effects.
I find these to be very good technical details.
If there's any documentation on volatileLoad and volatileStore, I
think the above should be added.