Author: Joseph Huber Date: 2022-04-11T17:27:38-04:00 New Revision: a1d57fc22587173c928ed5d82bc6b182d2465eb7
URL: https://github.com/llvm/llvm-project/commit/a1d57fc22587173c928ed5d82bc6b182d2465eb7 DIFF: https://github.com/llvm/llvm-project/commit/a1d57fc22587173c928ed5d82bc6b182d2465eb7.diff LOG: [OpenMP] Do not use the default pipeline without optimizations Summary: A previous patch added the option to use the default pipeline when perfomring LTO rather than the regular LTO pipeline. This greatly improved performance regressions we were observing with the LTO pipeline. However, this should not be used if the user explicitly disables optimizations as the default pipeline expects some optimizatoins to be perfomed. 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 618b181e92b53..2dc93ae0988e4 100644 --- a/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp +++ b/clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp @@ -860,7 +860,6 @@ std::unique_ptr<lto::LTO> createLTO( // TODO: Handle index-only thin-LTO Backend = lto::createInProcessThinBackend(llvm::heavyweight_hardware_concurrency()); - Conf.UseDefaultPipeline = true; Conf.CPU = Arch.str(); Conf.Options = codegen::InitTargetOptionsFromCodeGenFlags(TheTriple); @@ -868,6 +867,8 @@ std::unique_ptr<lto::LTO> createLTO( Conf.MAttrs = getTargetFeatures(TheTriple); Conf.CGOptLevel = getCGOptLevel(OptLevel[1] - '0'); Conf.OptLevel = OptLevel[1] - '0'; + if (Conf.OptLevel > 0) + Conf.UseDefaultPipeline = true; Conf.DefaultTriple = TheTriple.getTriple(); Conf.DiagHandler = diagnosticHandler; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits