diff --git a/lib/Fuzzer/FuzzerTracePC.cpp b/lib/Fuzzer/FuzzerTracePC.cpp index b66e7616b5f..e61d5e0cdb6 100644 --- a/lib/Fuzzer/FuzzerTracePC.cpp +++ b/lib/Fuzzer/FuzzerTracePC.cpp @@ -262,7 +262,10 @@ void TracePC::HandleCmp(void *PC, T Arg1, T Arg2) { uint64_t ArgXor = Arg1 ^ Arg2; uint64_t ArgDistance = __builtin_popcountl(ArgXor) + 1; // [1,65] uintptr_t Idx = ((PCuint & 4095) + 1) * ArgDistance; - TORCInsert(ArgXor, Arg1, Arg2); + if (sizeof(T) == 4) + TORC4.Insert(ArgXor, Arg1, Arg2); + else if (sizeof(T) == 8) + TORC8.Insert(ArgXor, Arg1, Arg2); HandleValueProfile(Idx); } diff --git a/lib/Fuzzer/FuzzerTracePC.h b/lib/Fuzzer/FuzzerTracePC.h index 2f8d1533cea..4cce36354d7 100644 --- a/lib/Fuzzer/FuzzerTracePC.h +++ b/lib/Fuzzer/FuzzerTracePC.h @@ -107,19 +107,6 @@ private: static const size_t kNumCounters = 1 << 14; alignas(8) uint8_t Counters[kNumCounters]; - void TORCInsert(size_t Idx, uint8_t Arg1, uint8_t Arg2) { - // Do nothing, too small to be interesting. - } - void TORCInsert(size_t Idx, uint16_t Arg1, uint16_t Arg2) { - // Do nothing, these don't usually hapen. - } - void TORCInsert(size_t Idx, uint32_t Arg1, uint32_t Arg2) { - TORC4.Insert(Idx, Arg1, Arg2); - } - void TORCInsert(size_t Idx, uint64_t Arg1, uint64_t Arg2) { - TORC8.Insert(Idx, Arg1, Arg2); - } - static const size_t kNumPCs = 1 << 24; uintptr_t PCs[kNumPCs];