git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: b060e6c) | patch
Fix compiler builtin usage in new pg_bitutils.c
2019年2月15日 16:07:02 +0000 (13:07 -0300)
2019年2月15日 16:39:56 +0000 (13:39 -0300)
commit fc6c72747ae6db6909fcd7d1adbc3d923ec1fffa
Fix compiler builtin usage in new pg_bitutils.c

Split out these new functions in three parts: one in a new file that
uses the compiler builtin and gets compiled with the -mpopcnt compiler
option if it exists; another one that uses the compiler builtin but not
the compiler option; and finally the fallback with open-coded
algorithms.

Split out the configure logic: in the original commit, it was selecting
to use the -mpopcnt compiler switch together with deciding whether to
use the compiler builtin, but those two things are really separate.
Split them out. Also, expose whether the builtin exists to
Makefile.global, so that src/port's Makefile can decide whether to
compile the hw-optimized file.

Remove CPUID test for CTZ/CLZ. Make pg_{right,left}most_ones use either
the compiler intrinsic or open-coded algo; trying to use the
HW-optimized version is a waste of time. Make them static inline
functions.

Discussion: https://postgr.es/m/20190213221719.GA15976@alvherre.pgsql
config/c-compiler.m4 diff | blob | blame | history
configure diff | blob | blame | history
configure.in diff | blob | blame | history
src/Makefile.global.in diff | blob | blame | history
src/include/port/pg_bitutils.h diff | blob | blame | history
src/port/Makefile diff | blob | blame | history
src/port/pg_bitutils.c diff | blob | blame | history
src/port/pg_bitutils_hwpopcnt.c [new file with mode: 0644] blob
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /