[13] RFR (S): 8075052: Autobox elimination hinders loop unrolling

Remi Forax forax at univ-mlv.fr
Sat Feb 2 06:13:19 UTC 2019

----- Mail original -----
> De: "John Rose" <john.r.rose at oracle.com>
> À: "Vladimir Ivanov" <vladimir.x.ivanov at oracle.com>
> Cc: "hotspot compiler" <hotspot-compiler-dev at openjdk.java.net>
> Envoyé: Samedi 2 Février 2019 06:26:15
> Objet: Re: [13] RFR (S): 8075052: Autobox elimination hinders loop unrolling

> Maybe it is time to create jdk.internal.vm.annotation.NoSideEffects
> and see if we can puzzle out the use cases and rules of application?
> Eventually we may want something like that as an official feature.



> On Feb 1, 2019, at 7:19 PM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com>
> wrote:
>> http://cr.openjdk.java.net/~vlivanov/8075052/webrev.00/
>> https://bugs.openjdk.java.net/browse/JDK-8075052
>> C2 doesn't optimize Integer.valueOf() as good as new Integer().
>> (There's a benchmark in the bug which demonstrates the difference.)
>> It is caused by the fact that though Integer.intValue() can see through the
>> call, the call itself isn't optimized away if the result (box) is not used. It
>> is unconditionally inlined and hinders consequent optimizations.
>> Proposed fix is to treat Integer.valueOf() as if it were a pure method and
>> remove the call if its result (boxed value) isn't used.
>> Testing: hs-precheckin-comp, tier1-7 (in progress)
>> Best regards,
> > Vladimir Ivanov

More information about the hotspot-compiler-dev mailing list