RFR(M): 8212243: More gc interface tweaks for arraycopy and some other smaller changes in preparation for Shenandoah
rwestrel at redhat.com
Thu Oct 18 12:23:12 UTC 2018
> So basically, you could make a new C2PostParseTimeAccess (name?!) that
> you wrap this information in, and send it through the
> BarrierSetC2::load_at backend.
> Similar how there is a GraphKit::access_load_at helper for baking the
> context object, you can have a helper (somewhere at your convenience)
> for baking the C2PostParseTimeAccess.
So you're suggesting an implementation of load and store that would work
after parsing. We don't know how to do that in general. Arraycopy
happens to be a special case where can emit the right barriers and
that's why it has a special entry point.
An object field load for us is:
a' = rb(a);
v = a'.f
an object field store is:
b' = wb(b);
b'.f = wb(v);
We have no way today of emitting the pre_barrier after parsing. In the
case of this patch, we don't need the pre_barrier because the copy is to
a newly allocated object.
The load_store barrier for arraycopy is wb(v) only because the rb(a) and
wb(b) are emitted at parse time right before the arraycopy.
So what you're suggesting would be to move that stuff under a generic
api which would be quite a bit more work and would actually not be
generic because we have no way of implementing the generic api today.
More information about the hotspot-compiler-dev