Blame SOURCES/0001-Disable-threading-in-thinLTO.patch

240573
diff -ru llvm-8.0.0.src.orig/lib/LTO/LTO.cpp llvm-8.0.0.src/lib/LTO/LTO.cpp
240573
--- llvm-8.0.0.src.orig/lib/LTO/LTO.cpp	2019-04-12 09:08:36.531911405 +0000
240573
+++ llvm-8.0.0.src/lib/LTO/LTO.cpp	2019-04-12 09:11:23.783949538 +0000
240573
@@ -953,7 +953,6 @@
240573
 
240573
 namespace {
240573
 class InProcessThinBackend : public ThinBackendProc {
240573
-  ThreadPool BackendThreadPool;
240573
   AddStreamFn AddStream;
240573
   NativeObjectCache Cache;
240573
   std::set<GlobalValue::GUID> CfiFunctionDefs;
240573
@@ -969,7 +968,6 @@
240573
       const StringMap<GVSummaryMapTy> &ModuleToDefinedGVSummaries,
240573
       AddStreamFn AddStream, NativeObjectCache Cache)
240573
       : ThinBackendProc(Conf, CombinedIndex, ModuleToDefinedGVSummaries),
240573
-        BackendThreadPool(ThinLTOParallelismLevel),
240573
         AddStream(std::move(AddStream)), Cache(std::move(Cache)) {
240573
     for (auto &Name : CombinedIndex.cfiFunctionDefs())
240573
       CfiFunctionDefs.insert(
240573
@@ -1027,32 +1025,12 @@
240573
     assert(ModuleToDefinedGVSummaries.count(ModulePath));
240573
     const GVSummaryMapTy &DefinedGlobals =
240573
         ModuleToDefinedGVSummaries.find(ModulePath)->second;
240573
-    BackendThreadPool.async(
240573
-        [=](BitcodeModule BM, ModuleSummaryIndex &CombinedIndex,
240573
-            const FunctionImporter::ImportMapTy &ImportList,
240573
-            const FunctionImporter::ExportSetTy &ExportList,
240573
-            const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>
240573
-                &ResolvedODR,
240573
-            const GVSummaryMapTy &DefinedGlobals,
240573
-            MapVector<StringRef, BitcodeModule> &ModuleMap) {
240573
-          Error E = runThinLTOBackendThread(
240573
+    return runThinLTOBackendThread(
240573
               AddStream, Cache, Task, BM, CombinedIndex, ImportList, ExportList,
240573
               ResolvedODR, DefinedGlobals, ModuleMap);
240573
-          if (E) {
240573
-            std::unique_lock<std::mutex> L(ErrMu);
240573
-            if (Err)
240573
-              Err = joinErrors(std::move(*Err), std::move(E));
240573
-            else
240573
-              Err = std::move(E);
240573
-          }
240573
-        },
240573
-        BM, std::ref(CombinedIndex), std::ref(ImportList), std::ref(ExportList),
240573
-        std::ref(ResolvedODR), std::ref(DefinedGlobals), std::ref(ModuleMap));
240573
-    return Error::success();
240573
   }
240573
 
240573
   Error wait() override {
240573
-    BackendThreadPool.wait();
240573
     if (Err)
240573
       return std::move(*Err);
240573
     else