RFR: 8266810: Move trivial Matcher code to cpu-specific header files

Claes Redestad redestad at openjdk.java.net
Mon May 10 13:56:18 UTC 2021


This patch moves a number of constants and trivial methods to newly introduced matcher_<cpu>.hpp files.

This enables constant folding and dead code elimination on one hand, and improved code navigation in IDEs on the other. 

The effect of this refactoring is modest: on Linux-x64 Hotspot (libjvm.so) shrinks by ~10Kb and C2 initialization cost drops from 8.5M to 8.3M.

Testing: tier1-3, GHA builds of all architectures on linux

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

Commit messages:
 - Move more predicates from .ad files
 - Move a few more predicates to matcher_cpu files
 - Add the new matcher per-cpu files
 - Add matcher_cpu files and move const bools there
 - Define constants to allow Matcher::supports_scalable_vector() calls to be DCEd on non-aarch64 platforms

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

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


More information about the hotspot-compiler-dev mailing list