RFR: 8217519: Improve RegMask population count calculation
Vladimir Kozlov
vladimir.kozlov at oracle.com
Tue Jan 22 17:30:49 UTC 2019
Yes, this is good.
Thanks,
Vladimir
On 1/22/19 8:23 AM, Tobias Hartmann wrote:
> Hi Claes,
>
> this looks good to me.
>
> Best regards,
> Tobias
>
> On 22.01.19 17:06, Claes Redestad wrote:
>> Hi,
>>
>> this patch extract the population count used in RegMask::Size() to a
>> utility method in share/utilities/population_count.hpp, as well as
>> adds a test that verifies this produces the same results as the existing
>> lookup table implementation.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8217519
>> Webrev: http://cr.openjdk.java.net/~redestad/8217519/open.00/
>>
>> This reduces instructions retired in RegMask::Size() by 50-60% in some
>> tests and profiles, which equates to a speedup of C2 by ~5% total. This
>> improves startup marginally in my tests.
>>
>> Compiler intrinsics (such as gcc's __builtin_popcount()) would be
>> appealing, but that actually gives worse performance than this patch (on
>> current build configurations/setups available to me).
>>
>> Testing: tier1-3 (ongoing, previous increments of the patch without
>> the gtest has been thoroughly tested)
>>
>> Thanks!
>>
>> /Claes
More information about the hotspot-compiler-dev
mailing list