RFR (M): 8068038: C2: large constant offsets aren't handled on SPARC
vladimir.kozlov at oracle.com
Thu Feb 25 23:54:58 UTC 2016
On 2/25/16 2:09 PM, Vladimir Ivanov wrote:
Looks fine but leave 32-bit removal to JDK-8150388.
> 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.
> Best regards,
> Vladimir Ivanov
> PS: there's an additional cleanup  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.
Should be part of JDK-8150388 changes.
>  http://cr.openjdk.java.net/~vlivanov/8068038/webrev.cleanup
More information about the hotspot-compiler-dev