[clang] 69a7777 - [OpenMP] Make linker wrapper thin-lto default thread count use all

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 1 06:44:36 PDT 2022


Author: Joseph Huber
Date: 2022-04-01T09:44:28-04:00
New Revision: 69a77771a9f5e577083338c3cebd61bbeb417843

URL: https://github.com/llvm/llvm-project/commit/69a77771a9f5e577083338c3cebd61bbeb417843
DIFF: https://github.com/llvm/llvm-project/commit/69a77771a9f5e577083338c3cebd61bbeb417843.diff

LOG: [OpenMP] Make linker wrapper thin-lto default thread count use all

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.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
index e9f616653d33e..618b181e92b53 100644
--- a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
+++ b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
@@ -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();


        


More information about the cfe-commits mailing list