RFR (S) 8150102: C1 should fold arraylength for constant/trusted arrays
Aleksey Shipilev
aleksey.shipilev at oracle.com
Thu Feb 18 16:03:59 UTC 2016
On 02/18/2016 05:02 PM, Vladimir Ivanov wrote:
> Maybe structure it as follows?
> } else {
> #ifdef ASSERT
> LoadField* lf = x->array()->as_LoadField();
> bool is_static_constant = (lf != NULL) && lf->field()->is_constant()
> && lf->field()->is_static();
> assert(!is_static_constant, "constant field loads are folded during
> parsing");
> #endif // ASSERT
> }
>
> But choose whatever version you like. I don't have a strong opinion here.
I like this version better:
http://cr.openjdk.java.net/~shade/8150102/webrev.03/
Still passes JPRT -testset hotspot.
Cheers,
-Aleksey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160218/bb826bf9/signature.asc>
More information about the hotspot-compiler-dev
mailing list