RFR: C2 reloads oop from memory in the middle of the LRB

Roland Westrelin rwestrel at redhat.com
Fri May 17 15:44:50 UTC 2019


http://cr.openjdk.java.net/~roland/shenandoah/nofwdptr-matcher-fix/webrev.00/

The matcher must find Nodes that must be emitted only once such as a
field/array Load. It does that by finding shared nodes (nodes with
multiple uses). With compressed oops, the actual pattern for an oop load
is (DecodeN (LoadN )) so the Load is not shared but the DecodeN
is. There is code to deal with that:

        if( mop == Op_AddP && m->in(AddPNode::Base)->is_DecodeNarrowPtr()) {
          // Bases used in addresses must be shared but since
          // they are shared through a DecodeN they may appear
          // to have a single use so force sharing here.
          set_shared(m->in(AddPNode::Base)->in(1));
        }

But with the load of the mark work, offset is null so there's not AddP
and that logic doesn't work.

Roland.


More information about the shenandoah-dev mailing list