[PATCH] D52049: [ThinLTOCodeGenerator] Avoid Rehash StringMap in ThreadPool

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 14 12:39:46 PDT 2018


This revision was automatically updated to reflect the committed changes.
steven_wu marked an inline comment as done.
Closed by commit rL342263: [ThinLTOCodeGenerator] Avoid Rehash StringMap in ThreadPool (authored by steven_wu, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D52049

Files:
  llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp


Index: llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp
===================================================================
--- llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp
+++ llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp
@@ -950,11 +950,15 @@
   // Changes are made in the index, consumed in the ThinLTO backends.
   internalizeAndPromoteInIndex(ExportLists, GUIDPreservedSymbols, *Index);
 
-  // Make sure that every module has an entry in the ExportLists and
-  // ResolvedODR maps to enable threaded access to these maps below.
-  for (auto &DefinedGVSummaries : ModuleToDefinedGVSummaries) {
-    ExportLists[DefinedGVSummaries.first()];
-    ResolvedODR[DefinedGVSummaries.first()];
+  // Make sure that every module has an entry in the ExportLists, ImportList,
+  // GVSummary and ResolvedODR maps to enable threaded access to these maps
+  // below.
+  for (auto &Module : Modules) {
+    auto ModuleIdentifier = Module.getBufferIdentifier();
+    ExportLists[ModuleIdentifier];
+    ImportLists[ModuleIdentifier];
+    ResolvedODR[ModuleIdentifier];
+    ModuleToDefinedGVSummaries[ModuleIdentifier];
   }
 
   // Compute the ordering we will process the inputs: the rough heuristic here


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52049.165571.patch
Type: text/x-patch
Size: 1191 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180914/ce9de0d5/attachment.bin>


More information about the llvm-commits mailing list