[all-commits] [llvm/llvm-project] 4e88e5: scudo: Use a table to look up the LSB for computin...
pcc via All-commits
all-commits at lists.llvm.org
Thu Apr 22 11:20:29 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4e88e5877c9f9df361b08ea74996d7af255e07ac
https://github.com/llvm/llvm-project/commit/4e88e5877c9f9df361b08ea74996d7af255e07ac
Author: Peter Collingbourne <peter at pcc.me.uk>
Date: 2021-04-22 (Thu, 22 Apr 2021)
Changed paths:
M compiler-rt/lib/scudo/standalone/combined.h
M compiler-rt/lib/scudo/standalone/size_class_map.h
Log Message:
-----------
scudo: Use a table to look up the LSB for computing the odd/even mask. NFCI.
In the most common case we call computeOddEvenMaskForPointerMaybe()
from quarantineOrDeallocateChunk(), in which case we need to look up
the class size from the SizeClassMap in order to compute the LSB. Since
we need to do a lookup anyway, we may as well look up the LSB itself
and avoid computing it every time.
While here, switch to a slightly more efficient way of computing the
odd/even mask.
Differential Revision: https://reviews.llvm.org/D101018
More information about the All-commits
mailing list