Index: lld/trunk/ELF/InputSection.h =================================================================== --- lld/trunk/ELF/InputSection.h +++ lld/trunk/ELF/InputSection.h @@ -253,7 +253,6 @@ // Splittable sections are handled as a sequence of data // rather than a single large blob of data. std::vector Pieces; - llvm::DenseMap OffsetMap; // Returns I'th piece's data. This function is very hot when // string merging is enabled, so we want to inline. Index: lld/trunk/ELF/InputSection.cpp =================================================================== --- lld/trunk/ELF/InputSection.cpp +++ lld/trunk/ELF/InputSection.cpp @@ -1206,21 +1206,12 @@ splitStrings(data(), Entsize); else splitNonStrings(data(), Entsize); - - OffsetMap.reserve(Pieces.size()); - for (size_t I = 0, E = Pieces.size(); I != E; ++I) - OffsetMap[Pieces[I].InputOff] = I; } SectionPiece *MergeInputSection::getSectionPiece(uint64_t Offset) { if (this->data().size() <= Offset) fatal(toString(this) + ": offset is outside the section"); - // Find a piece starting at a given offset. - auto It = OffsetMap.find(Offset); - if (It != OffsetMap.end()) - return &Pieces[It->second]; - // If Offset is not at beginning of a section piece, it is not in the map. // In that case we need to do a binary search of the original section piece vector. auto It2 =