[lld] r231584 - Resolver: Use LLVM StringMap and DenseMap.
Rui Ueyama
ruiu at google.com
Sat Mar 7 18:44:51 PST 2015
Author: ruiu
Date: Sat Mar 7 20:44:51 2015
New Revision: 231584
URL: http://llvm.org/viewvc/llvm-project?rev=231584&view=rev
Log:
Resolver: Use LLVM StringMap and DenseMap.
All defined symbols from all archive files are inserted to _archiveMap,
so performance of hash table matters here (I'm not trying to convert
all std::maps with DenseMaps). This change seems to make the linker
0.5% - 1% faster for my test case.
Modified:
lld/trunk/include/lld/Core/Resolver.h
Modified: lld/trunk/include/lld/Core/Resolver.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/Resolver.h?rev=231584&r1=231583&r2=231584&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/Resolver.h (original)
+++ lld/trunk/include/lld/Core/Resolver.h Sat Mar 7 20:44:51 2015
@@ -100,8 +100,8 @@ private:
size_t _fileIndex;
// Preloading
- std::map<StringRef, ArchiveLibraryFile *> _archiveMap;
- std::unordered_set<ArchiveLibraryFile *> _archiveSeen;
+ llvm::StringMap<ArchiveLibraryFile *> _archiveMap;
+ llvm::DenseSet<ArchiveLibraryFile *> _archiveSeen;
// List of undefined symbols.
std::vector<StringRef> _undefines;
More information about the llvm-commits
mailing list