RFR: 8256883: C2: Add a RegMask iterator

Claes Redestad redestad at openjdk.java.net
Mon Nov 23 19:40:06 UTC 2020


By implementing a simple RegMaskIterator we can speed this up and possibly make the code a bit clearer by doing so.

As a data point, this reduce the `C2Compiler::initialize` overhead from 8.82M instructions to 8.58M instructions, from the improvement in `PhaseChaitin::post_allocate_copy_removal` (~16k insns/compilation). The gain varies with type of compilation, so on the naive tests in `SimpleRepeatCompilation` it's in the noise (~2k insns/compilation on `trivialMath, for example).

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

Commit messages:
 - Remove tricky assert
 - Optimize away _current_bit, improve assertions
 - 8256883: C2: Add a RegMask iterator

Changes: https://git.openjdk.java.net/jdk/pull/1397/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1397&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8256883
  Stats: 82 lines in 4 files changed: 47 ins; 10 del; 25 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1397.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1397/head:pull/1397

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


More information about the hotspot-compiler-dev mailing list