[PATCH] D46657: [sanitizer] Minor 32-bit primary improvements
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 9 12:09:20 PDT 2018
cryptoad created this revision.
cryptoad added a reviewer: alekseyshl.
Herald added subscribers: Sanitizers, delcypher, kubamracek.
For the 32-bit TransferBatch:
- `SetFromArray` callers have bounds `count`, so relax the `CHECK` to `DCHECK`;
- same for `Add`;
- mark `CopyToArray` as `const`;
For the 32-bit Primary:
- `{Dea,A}llocateBatch` are only called from places that check `class_id`, relax the `CHECK` to `DCHECK`;
- same for `AllocateRegion`;
- remove `GetRegionBeginBySizeClass` that is not used;
- use a local variable for the random shuffle state, so that the compiler can use a register instead of reading and writing to the `SizeClassInfo` at every iteration;
For the 32-bit local cache:
- pass the count to drain instead of doing a `Min` everytime which is at times superfluous.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D46657
Files:
lib/sanitizer_common/sanitizer_allocator_local_cache.h
lib/sanitizer_common/sanitizer_allocator_primary32.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46657.145981.patch
Type: text/x-patch
Size: 4814 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180509/cf783e22/attachment.bin>
More information about the llvm-commits
mailing list