C2: add SafePointScalarObjectNodes from ValueTypeNodes to SafePointNodes without an allocation + propagate materialized value type in the graph
Roland Westrelin
rwestrel at redhat.com
Mon Nov 7 16:54:03 UTC 2016
http://cr.openjdk.java.net/~roland/valhalla/scalar_at_safepoints/webrev.00/
In general we shouldn't need a temporary allocation to eliminate value
type nodes at SafePoint nodes. Also, the temporary allocation currently
happens at uncommon traps but there are other safepoints that are not
currently handled. For instance, the first call to sumValue() in
test14() has a reference to v that is not currently handled. This change
creates SafePointScalarObjectNodes from ValueTypeNodes without a
temporary allocation. This doesn't take care of a safepoint that
references a value type that references another value type. I'll fix
that once flattened value type support is integrated. I'll also remove
the graphKit.cpp code that adds temporary allocations at uncommon traps
later.
I also noticed that test14() currently causes 2 allocations to be
emitted. Same with test15(). The change to
ValueTypeNode::store_to_memory() fixes that by creating a new
ValueTypeNode that has a reference to the allocation and replacing the
old one with the new one in the JVM state.
Finally, I noticed WhiteBox.deoptimize() doesn't work properly. That
will need to be fixed in jdk9 as well apparently (I can take care of
it).
Roland.
More information about the valhalla-dev
mailing list