RFR: 8265711: C1: Intrinsify Class.getModifier method [v3]

Vladimir Kozlov kvn at openjdk.java.net
Fri May 14 16:14:57 UTC 2021


On Wed, 28 Apr 2021 06:43:19 GMT, Yi Yang <yyang at openjdk.org> wrote:

>> It's relatively a common case to get modifiers from a constant Class instance, i.e. ThirdPartyClass.class.getModifiers(). Currently, C1 Canonicalizer missed the opportunity of replacing Class.getModifiers intrinsic calls with compile-time constants.
>
> Yi Yang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   rename; redundant reloading

test/hotspot/jtreg/compiler/c1/CanonicalizeGetModifiers.java line 31:

> 29:  * @requires vm.compiler1.enabled
> 30:  * @library /test/lib
> 31:  * @run main/othervm -XX:TieredStopAtLevel=1 -Xbatch

I would suggest to add 2 additional `@run` command to make sure test passed in all modes:
 - default: without `-XX:TieredStopAtLevel`
 - C2 only: with `-XX:-TieredCompilation`

-------------

PR: https://git.openjdk.java.net/jdk/pull/3616


More information about the hotspot-compiler-dev mailing list