RFR: 8265711: C1: Canonicalize Class.getModifier intrinsic method

Yi Yang yyang at openjdk.java.net
Thu Apr 22 07:08:32 UTC 2021


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.

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

Commit messages:
 - canonicalize well-chosen intrinsic methods

Changes: https://git.openjdk.java.net/jdk/pull/3616/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3616&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8265711
  Stats: 111 lines in 2 files changed: 111 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3616.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3616/head:pull/3616

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


More information about the hotspot-compiler-dev mailing list