[llvm] 0a17664 - Revert "[LTO] Add option enable NewPM with LTOCodeGenerator."

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 14:56:40 PST 2021


Author: Florian Hahn
Date: 2021-02-03T22:49:20Z
New Revision: 0a17664b47c153aa26a0d31b4835f26375440ec6

URL: https://github.com/llvm/llvm-project/commit/0a17664b47c153aa26a0d31b4835f26375440ec6
DIFF: https://github.com/llvm/llvm-project/commit/0a17664b47c153aa26a0d31b4835f26375440ec6.diff

LOG: Revert "[LTO] Add option enable NewPM with LTOCodeGenerator."

This reverts commit 7a6a2cc81aaf064e6f5bc9a9a16973f552d2bdc2 because
it is causing failures on green dragon.

Added: 
    

Modified: 
    llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
    llvm/lib/LTO/LTOCodeGenerator.cpp
    llvm/test/LTO/X86/diagnostic-handler-remarks.ll
    llvm/test/LTO/X86/disable-verify.ll
    llvm/test/Other/X86/lto-hot-cold-split.ll
    llvm/tools/llvm-lto/llvm-lto.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h b/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
index 8a7c49e7fd22..b57c7daf758a 100644
--- a/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
+++ b/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
@@ -186,8 +186,6 @@ struct LTOCodeGenerator {
 
   void setDisableVerify(bool Value) { DisableVerify = Value; }
 
-  void setUseNewPM(bool Value) { UseNewPM = Value; }
-
   void setDiagnosticHandler(lto_diagnostic_handler_t, void *);
 
   LLVMContext &getContext() { return Context; }
@@ -248,7 +246,6 @@ struct LTOCodeGenerator {
   bool Freestanding = false;
   std::unique_ptr<ToolOutputFile> StatsFile = nullptr;
   bool DisableVerify = false;
-  bool UseNewPM = LLVM_ENABLE_NEW_PASS_MANAGER;
 };
 }
 #endif

diff  --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index 86c0906caa36..180d906f506c 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -145,7 +145,6 @@ lto::Config LTOCodeGenerator::toConfig() const {
   Conf.PreCodeGenPassesHook = [](legacy::PassManager &PM) {
     PM.add(createObjCARCContractPass());
   };
-  Conf.UseNewPM = UseNewPM;
 
   return Conf;
 }

diff  --git a/llvm/test/LTO/X86/diagnostic-handler-remarks.ll b/llvm/test/LTO/X86/diagnostic-handler-remarks.ll
index f38293db93e1..6af6d8637c2e 100644
--- a/llvm/test/LTO/X86/diagnostic-handler-remarks.ll
+++ b/llvm/test/LTO/X86/diagnostic-handler-remarks.ll
@@ -1,41 +1,35 @@
 ; RUN: llvm-as < %s >%t.bc
 ; PR21108: Diagnostic handlers get pass remarks, even if they're not enabled.
 
-; FIXME: Update checks for new pass manager.
-
 ; Confirm that there are -pass-remarks.
-; RUN: llvm-lto -use-new-pm=false \
-; RUN:          -pass-remarks=inline \
+; RUN: llvm-lto -pass-remarks=inline \
 ; RUN:          -exported-symbol _func2 -pass-remarks-analysis=loop-vectorize \
 ; RUN:          -exported-symbol _main -o %t.o %t.bc 2>&1 | \
 ; RUN:     FileCheck %s -allow-empty -check-prefix=REMARKS
 ; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
 
-; RUN: llvm-lto -use-new-pm=false \
-; RUN:          -pass-remarks=inline -use-diagnostic-handler \
+; RUN: llvm-lto -pass-remarks=inline -use-diagnostic-handler \
 ; RUN:          -exported-symbol _func2 -pass-remarks-analysis=loop-vectorize \
-; RUN:          -exported-symbol _main -o %t.o %t.bc 2>&1 | \
+; RUN:         -exported-symbol _main -o %t.o %t.bc 2>&1 | \
 ; RUN:     FileCheck %s -allow-empty -check-prefix=REMARKS_DH
 ; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
 
 ; Confirm that -pass-remarks are not printed by default.
-; RUN: llvm-lto -use-new-pm=false \
+; RUN: llvm-lto \
 ; RUN:         -exported-symbol _func2 \
 ; RUN:         -exported-symbol _main -o %t.o %t.bc 2>&1 | \
 ; RUN:     FileCheck %s -allow-empty
 ; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
 
-; RUN: llvm-lto -use-new-pm=false \
-; RUN:          -use-diagnostic-handler \
-; RUN:          -exported-symbol _func2 \
-; RUN:          -exported-symbol _main -o %t.o %t.bc 2>&1 | \
+; RUN: llvm-lto -use-diagnostic-handler \
+; RUN:         -exported-symbol _func2 \
+; RUN:         -exported-symbol _main -o %t.o %t.bc 2>&1 | \
 ; RUN:     FileCheck %s -allow-empty
 ; RUN: llvm-nm %t.o | FileCheck %s -check-prefix NM
 
 ; Optimization records are collected regardless of the diagnostic handler
 ; RUN: rm -f %t.yaml
-; RUN: llvm-lto -use-new-pm=false \
-; RUN:          -lto-pass-remarks-output=%t.yaml \
+; RUN: llvm-lto -lto-pass-remarks-output=%t.yaml \
 ; RUN:          -exported-symbol _func2 \
 ; RUN:          -exported-symbol _main -o %t.o %t.bc 2>&1 | \
 ; RUN:     FileCheck %s -allow-empty

diff  --git a/llvm/test/LTO/X86/disable-verify.ll b/llvm/test/LTO/X86/disable-verify.ll
index 8f34edad2cc6..0d507e67305e 100644
--- a/llvm/test/LTO/X86/disable-verify.ll
+++ b/llvm/test/LTO/X86/disable-verify.ll
@@ -1,8 +1,6 @@
 ; RUN: llvm-as < %s >%t.bc
-; RUN: llvm-lto -use-new-pm=false -debug-pass=Arguments -exported-symbol=_f -o /dev/null %t.bc 2>&1 -disable-verify | FileCheck %s
-; RUN: llvm-lto -use-new-pm=false -debug-pass=Arguments -exported-symbol=_f -o /dev/null %t.bc 2>&1 | FileCheck %s -check-prefix=VERIFY
-
-; FIXME: Update checks for new pass manager.
+; RUN: llvm-lto -debug-pass=Arguments -exported-symbol=_f -o /dev/null %t.bc 2>&1 -disable-verify | FileCheck %s
+; RUN: llvm-lto -debug-pass=Arguments -exported-symbol=_f -o /dev/null %t.bc 2>&1 | FileCheck %s -check-prefix=VERIFY
 
 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-apple-macosx10.10.0"

diff  --git a/llvm/test/Other/X86/lto-hot-cold-split.ll b/llvm/test/Other/X86/lto-hot-cold-split.ll
index dda1437cbe85..1c6a33df21c7 100644
--- a/llvm/test/Other/X86/lto-hot-cold-split.ll
+++ b/llvm/test/Other/X86/lto-hot-cold-split.ll
@@ -1,10 +1,6 @@
 ; RUN: opt -module-summary %s -o %t.bc
-; RUN: llvm-lto -use-new-pm=false -hot-cold-split=true \
-; RUN:          -thinlto-action=run %t.bc -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=OLDPM-ANYLTO-POSTLINK-Os
-; RUN: llvm-lto -use-new-pm=false -hot-cold-split=true \
-; RUN:          %t.bc -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=OLDPM-ANYLTO-POSTLINK-Os
-
-; FIXME: Update checks for new pass manager.
+; RUN: llvm-lto -hot-cold-split=true -thinlto-action=run %t.bc -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=OLDPM-ANYLTO-POSTLINK-Os
+; RUN: llvm-lto -hot-cold-split=true %t.bc -debug-pass=Structure 2>&1 | FileCheck %s -check-prefix=OLDPM-ANYLTO-POSTLINK-Os
 
 ; REQUIRES: asserts
 

diff  --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp
index 027da28b30e2..e7b09a44d9c0 100644
--- a/llvm/tools/llvm-lto/llvm-lto.cpp
+++ b/llvm/tools/llvm-lto/llvm-lto.cpp
@@ -222,11 +222,6 @@ static cl::opt<bool> PrintMachOCPUOnly(
     "print-macho-cpu-only", cl::init(false),
     cl::desc("Instead of running LTO, print the mach-o cpu in each IR file"));
 
-static cl::opt<bool>
-    UseNewPM("use-new-pm",
-             cl::desc("Run LTO passes using the new pass manager"),
-             cl::init(LLVM_ENABLE_NEW_PASS_MANAGER), cl::Hidden);
-
 namespace {
 
 struct ModuleInfo {
@@ -1019,8 +1014,6 @@ int main(int argc, char **argv) {
   CodeGen.setOptLevel(OptLevel - '0');
   CodeGen.setAttrs(codegen::getMAttrs());
 
-  CodeGen.setUseNewPM(UseNewPM);
-
   if (auto FT = codegen::getExplicitFileType())
     CodeGen.setFileType(FT.getValue());
 


        


More information about the llvm-commits mailing list