mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-19 02:42:58 +00:00
[libFuzzer] minor speed improvement
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278856 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
269bd6538c
commit
f61ef6cf72
@ -26,7 +26,7 @@ struct ValueBitMap {
|
||||
|
||||
// Computed a hash function of Value and sets the corresponding bit.
|
||||
void AddValue(uintptr_t Value) {
|
||||
uintptr_t Idx = Value % kMapSizeInBits;
|
||||
uintptr_t Idx = Value < kMapSizeInBits ? Value : Value % kMapSizeInBits;
|
||||
uintptr_t WordIdx = Idx / kBitsInWord;
|
||||
uintptr_t BitIdx = Idx % kBitsInWord;
|
||||
Map[WordIdx] |= 1UL << BitIdx;
|
||||
|
Loading…
x
Reference in New Issue
Block a user