hanchenye-llvm-project/compiler-rt/cmake
Kostya Kortchinsky c4d6c938e3 [scudo] Separate hardware CRC32 routines
Summary:
As raised in D28304, enabling SSE 4.2 for the whole Scudo tree leads to the
emission of SSE 4.2 instructions everywhere, while the runtime checks only
applied to the CRC32 computing function.

This patch separates the CRC32 function taking advantage of the hardware into
its own file, and only enabled -msse4.2 for that file, if detected to be
supported by the compiler.

Another consequence of removing SSE4.2 globally is realizing that memcpy were
not being optimized, which turned out to be due to the -fno-builtin in
SANITIZER_COMMON_CFLAGS. So we now explicitely enable builtins for Scudo.

The resulting assembly looks good, with some CALLs are introduced instead of
the CRC32 code being inlined.

Reviewers: kcc, mgorny, alekseyshl

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D28417

llvm-svn: 291570
2017-01-10 16:39:36 +00:00
..
Modules Make cmake link flag naming consistent 2017-01-10 04:33:04 +00:00
caches [CMake] Updating Apple CMake cache file 2016-04-28 18:24:29 +00:00
base-config-ix.cmake [compiler-rt] Support building builtins for a single target 2016-12-12 23:14:02 +00:00
builtin-config-ix.cmake builtins: switch to c11 from c99 2016-11-29 02:31:40 +00:00
config-ix.cmake [scudo] Separate hardware CRC32 routines 2017-01-10 16:39:36 +00:00