]> sourceware.org Git - glibc.git/commit
Remove architecture specific sched_cpucount optimizations
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 24 Mar 2021 21:56:34 +0000 (18:56 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 7 May 2021 16:35:29 +0000 (13:35 -0300)
commitdb373e4c57159ac82df4b07b596dd29c4cfe9d86
treeaf01c60f6c1bbb8e2881fb7fc43bca85330d853c
parent69e0a5eb0d5acb4b55dbef68b68fc4a10f2911af
Remove architecture specific sched_cpucount optimizations

And replace the generic algorithm with the Brian Kernighan's one.
GCC optimize it with popcnt if the architecture supports, so there
is no need to add the extra POPCNT define to enable it.

This is really a micro-optimization that only adds complexity:
recent ABIs already support it (x86-64-v2 or power64le) and it
simplifies the code for internal usage, since i686 does not allow an
internal iFUNC call.

Checked on x86_64-linux-gnu, aarch64-linux-gnu, and
powerpc64le-linux-gnu.
posix/sched_cpucount.c
sysdeps/i386/i686/multiarch/sched_cpucount.c [deleted file]
sysdeps/ia64/sched_cpucount.c [deleted file]
sysdeps/powerpc/sched_cpucount.c [deleted file]
sysdeps/x86_64/multiarch/sched_cpucount.c [deleted file]
sysdeps/x86_64/sched_cpucount.c [deleted file]
This page took 0.041361 seconds and 5 git commands to generate.