[llvm] r270595 - [ThinLTO] Fix bot failures by avoiding threaded map modifications

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 11:44:02 PDT 2016


Author: tejohnson
Date: Tue May 24 13:44:01 2016
New Revision: 270595

URL: http://llvm.org/viewvc/llvm-project?rev=270595&view=rev
Log:
[ThinLTO] Fix bot failures by avoiding threaded map modifications

Ensure multiple threads won't have to modify map, probable cause of
bot failures from r270584 such as:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/13095

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

Modified: llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp?rev=270595&r1=270594&r2=270595&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp (original)
+++ llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp Tue May 24 13:44:01 2016
@@ -937,10 +937,12 @@ void ThinLTOCodeGenerator::run() {
   // Changes are made in the index, consumed in the ThinLTO backends.
   thinLTOInternalizeAndPromoteInIndex(*Index, isExported);
 
-  // Make sure that every module has an entry in the ExportLists to enable
-  // threaded access to this map below
-  for (auto &DefinedGVSummaries : ModuleToDefinedGVSummaries)
+  // 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()];
+  }
 
   // Compute the ordering we will process the inputs: the rough heuristic here
   // is to sort them per size so that the largest module get schedule as soon as




More information about the llvm-commits mailing list