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

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 15 11:52:33 PST 2021


Author: Benjamin Kramer
Date: 2021-02-15T20:49:09+01:00
New Revision: 715dc556b782f718ce1815aaf5c58626f5fe839c

URL: https://github.com/llvm/llvm-project/commit/715dc556b782f718ce1815aaf5c58626f5fe839c
DIFF: https://github.com/llvm/llvm-project/commit/715dc556b782f718ce1815aaf5c58626f5fe839c.diff

LOG: [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

Added: 
    

Modified: 
    llvm/lib/LTO/LTOBackend.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 5eaa621292f9..954aa2b85af8 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 {


        


More information about the llvm-commits mailing list