RFR (M): 8143407: C1: @Stable array support
paul.sandoz at oracle.com
Mon Feb 22 16:07:55 UTC 2016
> On 19 Feb 2016, at 19:34, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
> Add C1 support for constant folding loads from @Stable arrays.
> It aligns C1 & C2 behavior w.r.t. @Stable fields and was requested for VarHandles  implementation.
Many thanks for doing this.
I gave the patch a test run on x86 with a modified VarHandles impl, collapsing if/else over enum ordinals to stable array access. All tests pass and i observed no performance regression. More importantly, with a future internal refactor to VHs, i can push some casting functionality up from the access implementations into more general code, making things safer.
> I introduced StableArrayConstant to track stable array dimension.
> It is needed to disambiguate the following cases:
> (1) @Stable int intArr = new int[...][...][...];
> (2) @Stable Object objArr = new int[...][...][...];
> In the first case, all elements of multi-dimensional array w/ non-default values are considered constant.
> In the latter, only elements of objArray (which are int instances).
> Testing: unit tests on @Stable support, JPRT.
> Best regards,
> Vladimir Ivanov
>  http://openjdk.java.net/jeps/193
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the hotspot-compiler-dev