Add build flags to enable/disable specific SIMD instruction sets.
Mostly useful for x86. We used to have a feature (removed in 75318ec7) to disable avx-512. Likewise, some people would want a feature to disable specific instruction sets. For example, we currently have ASM functions for:
- C :-D
- SSE2 (very incomplete)
- SSSE3 (independent of SSE2)
- SSE4.1 (10-bit inverse transforms, depends otherwise on SSSE3)
- AVX2 (independent of SSE4.2/SSSE3)
- AVX512-icelake (partially dependent on AVX2, although unsure if that will remain)
You could reasonably create a build without the (incomplete) SSE2 set (ignoring the entropy coding) and that should save some minor binary size. Likewise, people might want to get rid of AVX512 or SSSE3/SSE4.2 because they're targeting only Haswell/Skylake and want minimal binary size.
Feature requested by (CC) @unlord.
Edited by Ronald S. Bultje