[PATCH] D40322: [scudo] Overhaul hardware CRC32 feature detection
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 13:59:05 PST 2017
cryptoad created this revision.
Herald added subscribers: kristof.beyls, srhines, aemerson.
This patch aims at condensing the hardware CRC32 feature detection and making
it slightly more effective on Android.
The following changes are included:
- remove the `CPUFeature` enum, and get rid of one level of nesting of functions: we only used CRC32, so we just implement and use `hasHardwareCRC32`;
- allow for a weak `getauxval`: the Android toolchain is compiled at API level 14 for Android ARM, meaning no `getauxval` at compile time, yet we will run on API level 27+ devices. The `/proc/self/auxv` fallback can work but is worthless for a process like `init` where the proc filesystem doesn't exist yet. If a weak `getauxval` doesn't exist, then fallback.
- couple of extra corrections.
https://reviews.llvm.org/D40322
Files:
lib/scudo/scudo_allocator.cpp
lib/scudo/scudo_utils.cpp
lib/scudo/scudo_utils.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40322.123847.patch
Type: text/x-patch
Size: 6768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171121/577d95eb/attachment.bin>
More information about the llvm-commits
mailing list