diff options
| author | Mehdi Amini <mehdi.amini@apple.com> | 2016-05-15 05:49:47 +0000 | 
|---|---|---|
| committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-05-15 05:49:47 +0000 | 
| commit | af52f28d9d9f79789c7be958167a974166fa13ac (patch) | |
| tree | 0f98793a0700ef2f1a87b99d5c11eb6bdfde9501 /llvm | |
| parent | fedb0fd907ec39329217af5a89b49f431f9f02be (diff) | |
| download | bcm5719-llvm-af52f28d9d9f79789c7be958167a974166fa13ac.tar.gz bcm5719-llvm-af52f28d9d9f79789c7be958167a974166fa13ac.zip  | |
ThinLTOCodeGenerator: fix race condition found using TSAN
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 269588
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/LTO/ThinLTOCodeGenerator.cpp | 5 | 
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp index 33d0a0cd920..2867c730125 100644 --- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp +++ b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp @@ -884,6 +884,11 @@ void ThinLTOCodeGenerator::run() {    auto GUIDPreservedSymbols =        computeGUIDPreservedSymbols(PreservedSymbols, TMBuilder.TheTriple); +  // Make sure that every module has an entry in the ExportLists to enable +  // threaded access to this map below +  for (auto &DefinedGVSummaries : ModuleToDefinedGVSummaries) +    ExportLists[DefinedGVSummaries.first()]; +    // Parallel optimizer + codegen    {      ThreadPool Pool(ThreadCount);  | 

