Andrew Haley <[EMAIL PROTECTED]> writes: > Tomash Brechko writes: > > > > > Several people already suggested to use volatile for shared data. > > Yes, it will help because we know it will disable all access > > optimizations, including thread-unaware ones. But I don't want to > > disable _all_ optimizations, I rather vote for thread-aware > > optimizations. > > But your plan would disable optimizations even when it isn't necessary > to do so. Only a small part of the data in a multi-threaded program > are shared.
At least for current x86 it is dubious the cmov change on memory was actually an improvement. -Andi