forked from OSchip/llvm-project
ThinLTOCodeGenerator: fix race condition found using TSAN
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 269588
This commit is contained in:
parent
fedb0fd907
commit
af52f28d9d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue