[9] RFR (M): 8068038: C2: large constant offsets aren't handled on SPARC
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Thu Feb 25 22:09:31 UTC 2016
http://cr.openjdk.java.net/~vlivanov/8068038/webrev.00
https://bugs.openjdk.java.net/browse/JDK-8068038
C2 doesn't handle large constant offsets ((>=2^12 bytes) on SPARC and
simply bails out the compilation and marks the method as non-compilable.
It has severe performance impact For example, some Octane benchmarks
suffer >10x slowdown.
The fix is to use variable-sized encoding and put large offsets in the
register. It means that all match rules and instructions which depend on
emit_form3_mem_reg become variable-sized as well and their size should
be computed dynamically.
I verified C2 compilation times and code emission still takes ~3-4%.
Also, did some cleanups: got rid of size computations in
MachSpillCopyNode::implementation and helper methods, refactored
printing logic.
Testing: octane, JPRT.
Thanks!
Best regards,
Vladimir Ivanov
PS: there's an additional cleanup [1] in sparc.ad (mostly 32-bit SPARC
removal, but also added some comments). It can go along with this fix or
as part of the 32-bit SPARC complete removal (JDK-8150388). Let me know
what do you prefer.
[1] http://cr.openjdk.java.net/~vlivanov/8068038/webrev.cleanup
More information about the hotspot-compiler-dev
mailing list