Skip to content

Commit

Permalink
[ThinLTO] Fix bot failures by avoiding threaded map modifications
Browse files Browse the repository at this point in the history
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270595 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
teresajohnson committed May 24, 2016
1 parent d7b9b91 commit 82332cd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/LTO/ThinLTOCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 82332cd

Please sign in to comment.