[8u20] [9] RFR (S): 8043546: C1 optimizes @Stable instance fields with default values

John Rose john.r.rose at oracle.com
Thu Jul 10 02:28:10 UTC 2014


On Jul 9, 2014, at 7:16 PM, John Rose <john.r.rose at oracle.com> wrote:

>> C1 already optimizes stable static fields and after this change it also optimizes stable instance fields. C1 doesn't support stable array, so tests are changed to distiguish 3 outcomes: no @Stable support, C1 & C2. I'll try to extend C1 support to arrays in the future.
> 
> The same "non default value" check is needed for getstatic as well as getfield.  I don't see how the existing getstatic is already correct.
> 
> — John

Sorry; now I see it.  The required check, for statics, comes from the setting at the bottom of ciField::initialize_from.  The corresponding non-static case gets a cut-out near the top, before the default-check.  This is why the *.hpp file says:

  // For non-static fields, the null/zero check must be
  // arranged by the user, as constant_value().is_null_or_zero().

I suppose an extra comment in c1_GB.cpp, near the processing of getstatic, might reassure forgetful and/or nervous readers.

— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20140709/7eb089fb/attachment-0001.html>


More information about the hotspot-compiler-dev mailing list