[PATCH] D28574: [scudo] Refactor of CRC32 and ARM runtime CRC32 detection

Michał Górny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 13 12:40:36 PST 2017


mgorny accepted this revision.
mgorny added a comment.

LGTM modulo the first comment. I won't be able to test it today, though, but I doubt it could break something for me ;-).



================
Comment at: lib/scudo/scudo_allocator.cpp:82
+  // the hardware version of the CRC32.
+#if defined(__SSE4_2__)
+  return computeHardwareCRC32(Crc, Data);
----------------
If I'm not mistaken, you could add `|| defined(__ARM_FEATURE_CRC32)` to cover the same idea for ARM.


================
Comment at: lib/scudo/scudo_allocator.cpp:85
+#else
+  if (computeHardwareCRC32 && HashType == CRC32Hardware)
+    return computeHardwareCRC32(Crc, Data);
----------------
I'm sorry if I'm a bit ignorant here but why are you checking the function address? Is there a potential case for it being null?


https://reviews.llvm.org/D28574





More information about the llvm-commits mailing list