RFR: 8256858: C2: Devirtualize PhaseIterGVN-specific methods

Claes Redestad redestad at openjdk.java.net
Mon Nov 23 15:11:04 UTC 2020


PhaseValues define the virtual method is_IterGVN, which is trivially returning 0(!) for all types except those derived from PhaseIterGVN. Similarly there's igvn_rehash_node_delayed which is virtual and a no-op in base types, but implemented to call rehash_node_delayed in PhaseIterGVN.

By devirtualizing we allow for more aggressive inlining and slightly better code generation in a few places. 

This increases sizeof(PhaseValues) from 2480 to 2488 on x64. Since we only go through a limited number of phases per compilation this seems acceptable.

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

Commit messages:
 - Simplify a bit
 - 8256858: C2: Devirtualize PhaseIterGVN-specific methods

Changes: https://git.openjdk.java.net/jdk/pull/1385/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1385&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8256858
  Stats: 55 lines in 5 files changed: 12 ins; 12 del; 31 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1385.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1385/head:pull/1385

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


More information about the hotspot-compiler-dev mailing list