projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9aa67b
)
[libFuzzer] minor speed improvement
author
Kostya Serebryany
<kcc@google.com>
Tue, 16 Aug 2016 21:28:05 +0000
(21:28 +0000)
committer
Kostya Serebryany
<kcc@google.com>
Tue, 16 Aug 2016 21:28:05 +0000
(21:28 +0000)
llvm-svn: 278856
llvm/lib/Fuzzer/FuzzerValueBitMap.h
patch
|
blob
|
history
diff --git
a/llvm/lib/Fuzzer/FuzzerValueBitMap.h
b/llvm/lib/Fuzzer/FuzzerValueBitMap.h
index
493afc5
..
65659f2
100644
(file)
--- a/
llvm/lib/Fuzzer/FuzzerValueBitMap.h
+++ b/
llvm/lib/Fuzzer/FuzzerValueBitMap.h
@@
-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;