llvm-project/compiler-rt
Kostya Kortchinsky d6f7a65197 [sanitizer] SizeClassMap minor improvement/correctness changes
Summary:
In `ClassID`, make sure we use an unsigned as based for the `lbits` shift.
The previous code resulted in spurious sign extensions like for x64:
```
add     esi, 0FFFFFFFFh
movsxd  rcx, esi
and     rcx, r15
```
The code with the `U` added is:
```
add     esi, 0FFFFFFFFh
and     rsi, r15
```
And for `MaxCachedHint`, use a 32-bit division instead of `64-bit`, which is
faster (https://lemire.me/blog/2017/11/16/fast-exact-integer-divisions-using-floating-point-operations/)
and already used in other parts of the code (64-bit `GetChunkIdx`, 32-bit
`GetMetaData` enforce 32-bit divisions)

Not major performance gains by any mean, but they don't hurt.

Reviewers: alekseyshl

Reviewed By: alekseyshl

Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers

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

llvm-svn: 324263
2018-02-05 19:22:56 +00:00
..
cmake [fuzzer] Update and enable libFuzzer on Fuchsia 2018-01-30 22:59:48 +00:00
docs [sanitizers] Make it possible to XFAIL on the effective target, not just the default. 2016-08-09 11:50:53 +00:00
include [XRay] [compiler-rt] stop writing garbage in naive log records 2018-01-30 13:25:25 +00:00
lib [sanitizer] SizeClassMap minor improvement/correctness changes 2018-02-05 19:22:56 +00:00
test Use NULL instead of nullptr in invalid-pointer-pairs-compare-null.cc; nullptr is not available on older Darwin systems. 2018-02-02 20:42:29 +00:00
unittests Allow compiler-rt test targets to work with multi-config CMake generators 2017-11-13 12:57:54 +00:00
www Update references to new lists.llvm.org mailing lists. 2015-08-05 03:58:00 +00:00
.arcconfig [compiler-rt] Set up .arcconfig to point to new Diffusion CRT repository 2017-12-06 20:55:32 +00:00
.gitignore Add .pyc files to .gitignore to compiler-rt 2017-07-24 21:51:12 +00:00
CMakeLists.txt [CMake] Support runtimes and monorepo layouts when looking for libcxx 2017-12-12 01:20:52 +00:00
CODE_OWNERS.TXT [sanitizers] remove earthdok@ from owners 2016-05-18 18:52:18 +00:00
CREDITS.TXT
LICENSE.TXT Update copyright year to 2016. 2016-03-30 22:38:50 +00:00
README.txt

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================