RFR: 8257221: C2: Improve RegMask::is_bound

Claes Redestad redestad at openjdk.java.net
Fri Nov 27 20:20:10 UTC 2020


This patch adds more tests for RegMask::is_bound* operations, and fixes a bug I introduced in JDK-8221404 where I mixed up the formula for how much we need to shift the "bit" when checking a split set.

This also optimizes RegMask::is_bound (~2x) by removing use of Size() in is_bound1 and streamlining the three component methods (is_bound1, is_bound_pair, is_bound_set) so that they all do a cheap check that the remaining words are all zero after a matching bit, pair or set has been found.

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

Commit messages:
 - Add is_bound_set test, fix bug caused by 8221404
 - Add is_bound_pair test, remove redundant test in else branch, fix accidentally 32-bit uint bit
 - Merge branch 'master' into regmask_bound
 - Merge branch 'master' into regmask_bound
 - C2: Optimize is_bound

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

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


More information about the hotspot-compiler-dev mailing list