RFR: 8217869: Add count_leading_zeros utility

Nils Eliasson nils.eliasson at oracle.com
Mon Jan 28 09:36:19 UTC 2019


A very welcome improvement.

Thank you Claes!

Reviewed,

// Nils

On 2019-01-28 10:34, Claes Redestad wrote:
> Hi,
>
> adding a count_leading_zeros implementation using compiler intrinsics
> means a straightforward optimization of RegMask::find_highest_bit. For
> platforms lacking intrinsic support a more efficient algorithm is
> implemented.
>
> Adding a 64-bit version would be straightforward, but let's do that
> when we need it.
>
> Bug:    https://bugs.openjdk.java.net/browse/JDK-8217869
> Webrev: http://cr.openjdk.java.net/~redestad/8217869/open.00/
>
> Testing: tier1-3
>
> The xlc changes are untested, so it'd be much appreciated if someone
> can run the test on that platform.
>
> Thanks!
>
> /Claes


More information about the hotspot-compiler-dev mailing list