diff --git a/llvm/include/llvm/ProfileData/InstrProfCorrelator.h b/llvm/include/llvm/ProfileData/InstrProfCorrelator.h --- a/llvm/include/llvm/ProfileData/InstrProfCorrelator.h +++ b/llvm/include/llvm/ProfileData/InstrProfCorrelator.h @@ -118,8 +118,6 @@ InstrProfCorrelatorImpl(InstrProfCorrelatorKind Kind, std::unique_ptr Ctx) : InstrProfCorrelator(Kind, std::move(Ctx)){}; - llvm::DenseSet CounterOffsets; - // Byte-swap the value if necessary. template T maybeSwap(T Value) const { return Ctx->ShouldSwapBytes ? sys::getSwappedBytes(Value) : Value; diff --git a/llvm/lib/ProfileData/InstrProfCorrelator.cpp b/llvm/lib/ProfileData/InstrProfCorrelator.cpp --- a/llvm/lib/ProfileData/InstrProfCorrelator.cpp +++ b/llvm/lib/ProfileData/InstrProfCorrelator.cpp @@ -150,7 +150,6 @@ "could not find any profile metadata in debug info"); auto Result = collectPGOFuncNameStrings(NamesVec, /*doCompression=*/false, Names); - CounterOffsets.clear(); NamesVec.clear(); return Result; } @@ -161,9 +160,6 @@ IntPtrT CounterOffset, IntPtrT FunctionPtr, uint32_t NumCounters) { - // Check if a probe was already added for this counter offset. - if (!CounterOffsets.insert(CounterOffset).second) - return; Data.push_back({ maybeSwap(IndexedInstrProf::ComputeHash(FunctionName)), maybeSwap(CFGHash),