Support SSE-enabled Range functions under Clang
Summary: [Folly] Support SSE-enabled `Range` functions under Clang. Basically, we remove GCC-only -isms. In particular, we use only names from the `<emmintrins.h>` and `<smmintrins.h>` headers, instead of the GCC-specific SSE builtins that the original code uses. But in order to get this to work, we must split out the SSE-enabled functions into their own sources and compile them with the `-msse4.2` flag. There is a way to get around this in GCC by marking individual functions as SEE-enabled, but that technique is not supported in Clang. This is the new `RangeSse42` module. And in order to do that, we must split out the code that is called by both the original `Range` and the new SSE-enabled functions into yet a third module, `RangeCommon`. Ahhhhhh, dependencies. Note that we always compile the SSE-enabled functions, but we only run them on architectures supporting SSE. The original code tests the CPU's capabilities before running any SSE-enabled functions; this change retains that check. Reviewed By: @nbronson Differential Revision: D2428983
Showing
folly/detail/RangeCommon.cpp
0 → 100644
folly/detail/RangeCommon.h
0 → 100644
folly/detail/RangeSse42.h
0 → 100644
Please register or sign in to comment