RFR: 8257221: C2: Improve RegMask::is_bound
Vladimir Kozlov
kvn at openjdk.java.net
Fri Nov 27 22:05:01 UTC 2020
On Fri, 27 Nov 2020 20:12:47 GMT, Claes Redestad <redestad at openjdk.org> wrote:
> 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.
okay.
src/hotspot/share/opto/regmask.cpp line 144:
> 142: }
> 143:
> 144: // Return TRUE iff the mask contains a single bit
I thought it is typo but:
`iff - conjunction Logic & Mathematics if and only if (as a written abbreviation).`
-------------
Marked as reviewed by kvn (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1486
More information about the hotspot-compiler-dev
mailing list