fixes for barriers on constant oops

Roland Westrelin rwestrel at redhat.com
Tue Jun 27 08:04:18 UTC 2017


http://cr.openjdk.java.net/~roland/shenandoah/barrier-on-const-fixes/webrev.00/

The patch includes:

- missing barriers on constant oops

- a small fix for compare and exchange in x86_64.ad: setting the cost to
  1000 is apparently not sufficient as I found the CAE could be emitted
  without the barriers

- a change to the implementation of acmp so now instead of building:

if (a != b) {
  a = rb(a);
  b = rb(b);
}
if (a == b) {

} else {

}

at parse time and letting the compiler possibly optimize it to:

if (a != b) {
  a = rb(a);
  b = rb(b);
  if (a != b) {
  } else {
  }
} else {

}

C2 builds the second form at parse time. It's not as easy to plug the
new graph shape where there are pointer comparisons (in intrinsics). So
other pointer comparisons now all use:

a = wb(a);
b = wb(b);

if (a == b) {

} else {

}

- another fix to the write barrier code once expanded when it's applied
  to a constant oop

- some unrelated fixes

Roland.


More information about the shenandoah-dev mailing list