Skip to content

Commit 715dc55

Browse files
committed
[lto] Enable new PM when the PM config is non-empty
This restores the behavior before 964f810, which broke 2 tests: LLVM :: tools/llvm-lto2/X86/pipeline.ll lld :: ELF/lto/ltopasses-custom.ll
1 parent 5cf9292 commit 715dc55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/LTO/LTOBackend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ bool lto::opt(const Config &Conf, TargetMachine *TM, unsigned Task, Module &Mod,
355355
/*Cmdline*/ CmdArgs);
356356
}
357357
// FIXME: Plumb the combined index into the new pass manager.
358-
if (Conf.UseNewPM) {
358+
if (Conf.UseNewPM || !Conf.OptPipeline.empty()) {
359359
runNewPMPasses(Conf, Mod, TM, Conf.OptLevel, IsThinLTO, ExportSummary,
360360
ImportSummary);
361361
} else {

0 commit comments

Comments
 (0)