[lto] Enable new PM when the PM config is non-empty

This restores the behavior before 964f8103c5, which broke 2 tests:
  LLVM :: tools/llvm-lto2/X86/pipeline.ll
  lld :: ELF/lto/ltopasses-custom.ll
This commit is contained in:
Benjamin Kramer 2021-02-15 20:49:09 +01:00
parent 5cf9292ce3
commit 715dc556b7
1 changed files with 1 additions and 1 deletions

View File

@ -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 {