[PATCH] Switch the new COFF linker's symbol table to use a DenseMap of StringRefs. This uses the LLVM hashing rather than the standard library and a closed addressed hash table rather than chaining.

Chandler Carruth chandlerc at gmail.com
Fri Jun 26 19:05:56 PDT 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D10684

Files:
  lld/trunk/COFF/SymbolTable.h

Index: lld/trunk/COFF/SymbolTable.h
===================================================================
--- lld/trunk/COFF/SymbolTable.h
+++ lld/trunk/COFF/SymbolTable.h
@@ -11,9 +11,10 @@
 #define LLD_COFF_SYMBOL_TABLE_H
 
 #include "InputFiles.h"
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/DenseMapInfo.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/raw_ostream.h"
-#include <unordered_map>
 
 namespace llvm {
 struct LTOCodeGenerator;
@@ -90,7 +91,7 @@
   std::error_code addMemberFile(Lazy *Body);
   ErrorOr<ObjectFile *> createLTOObject(llvm::LTOCodeGenerator *CG);
 
-  std::unordered_map<StringRef, Symbol *> Symtab;
+  llvm::DenseMap<StringRef, Symbol *> Symtab;
   std::vector<std::unique_ptr<InputFile>> Files;
   size_t FileIdx = 0;
   std::vector<ArchiveFile *> ArchiveFiles;

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10684.28620.patch
Type: text/x-patch
Size: 816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150627/b19009af/attachment.bin>


More information about the llvm-commits mailing list