RFR: 8183574: Unify the is_power_of_2 functions
Stefan Karlsson
stefan.karlsson at oracle.com
Thu Feb 13 14:47:11 UTC 2020
Hi all,
Please review this patch to consolidate all is_power_of_2 functions into
one template function and place it in the existing powerOfTwo.hpp file.
To resolve a circular dependency between globalDefinitions.hpp and
powerOfTwo.hpp, I also moved exact_log2 and exact_log2_long. These
functions take a power-of-two value and returns the log2 value, so I
think it makes sense to move them to powerOfTwo.hpp.
https://cr.openjdk.java.net/~stefank/8183574/webrev.01
https://bugs.openjdk.java.net/browse/JDK-8183574
Tested with tier1,2,3
Also built locally with
{fastdebug,release}x{minimal,zero,aarch64,ppc,s390,arm32,shenandoah}
Thanks,
StefanK
More information about the hotspot-dev
mailing list