Optimization of conditional access to globals: thread-unsafe?
Michael Matz
matz@suse.de
Mon Oct 29 20:59:00 GMT 2007
Hi,
On Mon, 29 Oct 2007, Tomash Brechko wrote:
> Still, I believe the example proves the general idea. It shows that
> speculative store is never safe, because every 'if' may be an 'if not
> read-only'-one.
It is safe if there's another dominating store outside the control region.
Apart from that I reluctantly agree (i.e. it's not enough if there's any
dominating access through the pointer in question, it must be a store).
Ciao,
Michael.
More information about the Gcc
mailing list