From: Joseph Huber Date: Fri, 1 Apr 2022 13:42:21 +0000 (-0400) Subject: [OpenMP] Make linker wrapper thin-lto default thread count use all X-Git-Tag: upstream/15.0.7~11736 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69a77771a9f5e577083338c3cebd61bbeb417843;p=platform%2Fupstream%2Fllvm.git [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. --- diff --git a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp index e9f6166..618b181 100644 --- a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp +++ b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp @@ -858,8 +858,8 @@ std::unique_ptr 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();