[OpenMP] Make linker wrapper thin-lto default thread count use all
authorJoseph Huber <jhuber6@vols.utk.edu>
Fri, 1 Apr 2022 13:42:21 +0000 (09:42 -0400)
committerJoseph Huber <jhuber6@vols.utk.edu>
Fri, 1 Apr 2022 13:44:28 +0000 (09:44 -0400)
Summary:
Currently there is no option to configure the number of thin-backend
threads to use when performing thin-lto on the device, but we should
default to use all the threads rather than just one. In the future we
should use the same arguments that gold / lld use and parse it here.

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

index e9f6166..618b181 100644 (file)
@@ -858,8 +858,8 @@ std::unique_ptr<lto::LTO> createLTO(
   lto::Config Conf;
   lto::ThinBackend Backend;
   // TODO: Handle index-only thin-LTO
-  Backend = lto::createInProcessThinBackend(
-      llvm::heavyweight_hardware_concurrency(1));
+  Backend =
+      lto::createInProcessThinBackend(llvm::heavyweight_hardware_concurrency());
   Conf.UseDefaultPipeline = true;
 
   Conf.CPU = Arch.str();