summaryrefslogtreecommitdiffstats
path: root/clang/lib/ASTMatchers/ASTMatchersInternal.cpp
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2018-02-05 19:22:56 +0000
committerKostya Kortchinsky <kostyak@google.com>2018-02-05 19:22:56 +0000
commitd6f7a65197a4c11f456d95144ae11ef7d330197c (patch)
tree10aba3e03f458da84d5c4a4f28f0fc0401be7ef4 /clang/lib/ASTMatchers/ASTMatchersInternal.cpp
parente80ce52cee4902eccafbd36a2576fec49c701c9c (diff)
downloadbcm5719-llvm-d6f7a65197a4c11f456d95144ae11ef7d330197c.tar.gz
bcm5719-llvm-d6f7a65197a4c11f456d95144ae11ef7d330197c.zip
[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
Diffstat (limited to 'clang/lib/ASTMatchers/ASTMatchersInternal.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud