Yue Yang wrote:
> If the StoreLoad barrier is only for the same location, the interleaving
> would be allowed.
Thanks! You are right. My wording was too strong.
It now says:
A StoreLoad is strictly necessary only between stores and subsequent
loads of the same sets of location. They can be eliminated when you
can guarantee that the set of stores before the barrier has no common
elements with the set of loads before the next barrier. For example,
assuming distinct (unaliased) locations a, b, c:
store a; StoreLoad; load b; store c; StoreLoad
can be transformed to:
store a; load b; store c; StoreLoad
if the thread has never written b.
(As responses to http://gee.cs.oswego.edu/dl/jmm/cookbook.html
trickle down, I'll publically post it soon. )
-- Doug Lea, Computer Science Department, SUNY Oswego, Oswego, NY 13126 USA email@example.com 315-312-2688 FAX:315-312-5424 http://gee.cs.oswego.edu/ ------------------------------- JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:42 EDT