mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
ThinLTOCodeGenerator: fix race condition found using TSAN
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 269588
This commit is contained in:
parent
8aaea5b68f
commit
96bc72cb3b
@ -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…
x
Reference in New Issue
Block a user