RFR(M): tweak zeroing elimination to support initialization of non flattened value arrays

Roland Westrelin rwestrel at redhat.com
Wed Sep 5 12:26:41 UTC 2018


http://cr.openjdk.java.net/~roland/valhalla/zeroingelimination/webrev.00/

This tweaks zeroing elimination so it also works with a non zero initial
value. This way there's no need to explicitly initialize non flattened
value arrays to their default value and all zeroing elimination
optimizations apply to non flattened array. It also allows the
implementation of fast path allocation through reflection of non
flattened value array of unknown element type.

The default value for an allocation is attached to the AllocateNode and
passed to the ClearArray node when the AllocateNode is expanded. 2
values are actually attached: the default value as an oop and the
default value as a heap word (which in the case of compressed oops is 2
oops shifted and or'ed together). The reason for the 2 extra inputs is
for relection allocation where, at compile time, there's no way to tell
if there's a default value or not.

Roland.


More information about the valhalla-dev mailing list