mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[libFuzzer] minor speed improvement
llvm-svn: 278856
This commit is contained in:
parent
8384a7726b
commit
53ab688ab6
@ -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