RFR(M): 8080289: Intermediate writes in a loop not eliminated by optimizer

Roland Westrelin roland.westrelin at oracle.com
Tue Jun 23 08:11:43 UTC 2015


> > http://gee.cs.oswego.edu/dl/jmm/cookbook.html
> >
> > it’s allowed to reorder normal stores with normal stores
> 
> If we can guarantee that all passed stores are normal (I assume we will have barriers otherwise in between) then I agree.

If I read the code correctly when support_IRIW_for_not_multiple_copy_atomic_cpu is true we don’t add a membar after a volatile store so folding a store with previous ones would not be a correct optimization because it could remove volatile stores. This said the current code in StoreNode::Ideal() that folds back to back stores has the effect or reordering stores on different slices. So isn’t there a bug already?

Roland.


More information about the hotspot-compiler-dev mailing list