aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LTO/LTOBackend.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2021-02-15 20:49:09 +0100
committerBenjamin Kramer <benny.kra@googlemail.com>2021-02-15 20:49:09 +0100
commit715dc556b782f718ce1815aaf5c58626f5fe839c (patch)
treef39469eecf2b4d92a921551efa88cbe1f0e7d970 /llvm/lib/LTO/LTOBackend.cpp
parent5cf9292ce341d2002f5d6e0189d54e29f9e71afe (diff)
downloadllvm-715dc556b782f718ce1815aaf5c58626f5fe839c.zip
llvm-715dc556b782f718ce1815aaf5c58626f5fe839c.tar.gz
llvm-715dc556b782f718ce1815aaf5c58626f5fe839c.tar.bz2
[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
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp2
1 files changed, 1 insertions, 1 deletions
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 {