> I agree it would be preferable to make a centralized check work.

Here is my first stab at it. v9 is same as v8 + a commit to move all cpuid 
checks into one single place including the AVX512 popcount code. Any new 
feature that requires CPUID information can access that information with 
pg_cpu_have[FEATURE] defined in pg_cpucap.h and initialized in pg_cpucap.c. v8 
also had a typo in configure files which caused a build failure. Its fixed in 
v9.

Pretty sure the ARM code paths need some correction. Let me know what you think.
 
> Correct me if I'm misunderstanding, but this sounds like in every frontend
> program we'd need to know what the first call was, which seems less
> maintainable than just initializing at the start of every frontend program.

No, sorry for the confusion but that is not what I meant. Lets ignore the 
attribute constructor for now. We can probably revisit this at a later point.

Raghuveer

Attachment: v9-0001-Dispatch-CRC-computation-by-branching-rather-than.patch
Description: v9-0001-Dispatch-CRC-computation-by-branching-rather-than.patch

Attachment: v9-0002-Rename-CRC-choose-files-to-cpucap-files.patch
Description: v9-0002-Rename-CRC-choose-files-to-cpucap-files.patch

Attachment: v9-0003-Add-a-Postgres-SQL-function-for-crc32c-benchmarki.patch
Description: v9-0003-Add-a-Postgres-SQL-function-for-crc32c-benchmarki.patch

Attachment: v9-0004-Improve-CRC32C-performance-on-x86_64.patch
Description: v9-0004-Improve-CRC32C-performance-on-x86_64.patch

Attachment: v9-0005-Move-all-cpuid-checks-to-one-location.patch
Description: v9-0005-Move-all-cpuid-checks-to-one-location.patch

Reply via email to