[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:38:17 PDT 2018
steven_wu updated this revision to Diff 165570.
steven_wu added a comment.
Update comments
Repository:
rL LLVM
https://reviews.llvm.org/D52049
Files:
lib/LTO/ThinLTOCodeGenerator.cpp
Index: lib/LTO/ThinLTOCodeGenerator.cpp
===================================================================
--- lib/LTO/ThinLTOCodeGenerator.cpp
+++ 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.165570.patch
Type: text/x-patch
Size: 1158 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180914/acdb6b2f/attachment.bin>
More information about the llvm-commits
mailing list