Re: JavaMemoryModel: Draft JSR-133 Cookbook for compiler writers

From: Doug Lea (
Date: Fri Dec 06 2002 - 12:27:17 EST

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
trickle down, I'll publically post it soon. )

Doug Lea, Computer Science Department, SUNY Oswego, Oswego, NY 13126 USA 315-312-2688 FAX:315-312-5424  
JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:42 EDT