From 715dc556b782f718ce1815aaf5c58626f5fe839c Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Mon, 15 Feb 2021 20:49:09 +0100 Subject: [PATCH] [lto] Enable new PM when the PM config is non-empty This restores the behavior before 964f8103c58d, which broke 2 tests: LLVM :: tools/llvm-lto2/X86/pipeline.ll lld :: ELF/lto/ltopasses-custom.ll --- llvm/lib/LTO/LTOBackend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp index 5eaa621..954aa2b 100644 --- a/llvm/lib/LTO/LTOBackend.cpp +++ b/llvm/lib/LTO/LTOBackend.cpp @@ -355,7 +355,7 @@ bool lto::opt(const Config &Conf, TargetMachine *TM, unsigned Task, Module &Mod, /*Cmdline*/ CmdArgs); } // FIXME: Plumb the combined index into the new pass manager. - if (Conf.UseNewPM) { + if (Conf.UseNewPM || !Conf.OptPipeline.empty()) { runNewPMPasses(Conf, Mod, TM, Conf.OptLevel, IsThinLTO, ExportSummary, ImportSummary); } else { -- 2.7.4