[PATCH] D28417: [scudo] Separate hardware CRC32 routines
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 15:29:11 PST 2017
cryptoad created this revision.
cryptoad added reviewers: kcc, alekseyshl, mgorny.
cryptoad added a subscriber: llvm-commits.
As raised in https://reviews.llvm.org/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.
https://reviews.llvm.org/D28417
Files:
cmake/config-ix.cmake
lib/scudo/CMakeLists.txt
lib/scudo/scudo_allocator.cpp
lib/scudo/scudo_crc32.cpp
lib/scudo/scudo_crc32.h
lib/scudo/scudo_utils.cpp
lib/scudo/scudo_utils.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28417.83444.patch
Type: text/x-patch
Size: 7423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170106/291ab143/attachment.bin>
More information about the llvm-commits
mailing list