[lld] Remove transitional legacy pass manager flags
authorArthur Eubanks <aeubanks@google.com>
Wed, 25 Jan 2023 19:25:35 +0000 (11:25 -0800)
committerArthur Eubanks <aeubanks@google.com>
Thu, 26 Jan 2023 19:12:21 +0000 (11:12 -0800)
Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D142571

lld/COFF/Driver.cpp
lld/ELF/Options.td
lld/MachO/Options.td
lld/test/COFF/lto-new-pass-manager.ll
lld/test/ELF/lto/new-pass-manager.ll
lld/test/ELF/lto/slp-vectorize-pm.ll
lld/test/ELF/lto/verify-invalid.ll
lld/test/MachO/lto-objc-arc-contract.ll
lld/test/wasm/lto/new-pass-manager.ll
lld/test/wasm/lto/verify-invalid.ll
lld/wasm/Options.td

index 0a153c8..edfa7f6 100644 (file)
@@ -1761,8 +1761,6 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
         tailMerge = 2;
       } else if (s == "nolldtailmerge") {
         tailMerge = 0;
-      } else if (s == "ltonewpassmanager") {
-        /* We always use the new PM. */
       } else if (s == "ltodebugpassmanager") {
         ltoDebugPM = true;
       } else if (s == "noltodebugpassmanager") {
index 09dc8c5..f9d02db 100644 (file)
@@ -554,8 +554,6 @@ def lto_debug_pass_manager: FF<"lto-debug-pass-manager">,
   HelpText<"Debug new pass manager">;
 def lto_emit_asm: FF<"lto-emit-asm">,
   HelpText<"Emit assembly code">;
-def no_lto_legacy_pass_manager: FF<"no-lto-legacy-pass-manager">,
-  HelpText<"Use the new pass manager in LLVM">;
 def lto_newpm_passes: JJ<"lto-newpm-passes=">,
   HelpText<"Passes to run during LTO">;
 def lto_O: JJ<"lto-O">, MetaVarName<"<opt-level>">,
@@ -627,8 +625,6 @@ def plugin_opt_emit_llvm: F<"plugin-opt=emit-llvm">;
 def: J<"plugin-opt=jobs=">, Alias<thinlto_jobs_eq>, HelpText<"Alias for --thinlto-jobs=">;
 def: J<"plugin-opt=lto-partitions=">, Alias<lto_partitions>, HelpText<"Alias for --lto-partitions">;
 def plugin_opt_mcpu_eq: J<"plugin-opt=mcpu=">;
-def: F<"plugin-opt=new-pass-manager">,
-  Alias<no_lto_legacy_pass_manager>, HelpText<"Alias for --no-lto-legacy-pass-manager">;
 def: F<"plugin-opt=cs-profile-generate">,
   Alias<lto_cs_profile_generate>, HelpText<"Alias for --lto-cs-profile-generate">;
 def: J<"plugin-opt=cs-profile-path=">,
index f05835d..cb66f62 100644 (file)
@@ -53,9 +53,6 @@ def reproduce_eq: Joined<["--"], "reproduce=">,
 def version: Flag<["--"], "version">,
     HelpText<"Display the version number and exit">,
     Group<grp_lld>;
-def no_lto_legacy_pass_manager : Flag<["--"], "no-lto-legacy-pass-manager">,
-    HelpText<"Use the new pass manager in LLVM">,
-    Group<grp_lld>;
 def time_trace_eq: Joined<["--"], "time-trace=">,
     HelpText<"Record time trace to <file>">,
     MetaVarName<"<file>">,
index 9e7b7f0..b210f34 100644 (file)
@@ -1,7 +1,7 @@
 ; REQUIRES: x86
 ; RUN: llvm-as %s -o %t.obj
 
-; RUN: lld-link %t.obj -entry:main -opt:ltonewpassmanager -opt:ltodebugpassmanager 2>&1 | FileCheck %s --check-prefix=ENABLED
+; RUN: lld-link %t.obj -entry:main -opt:ltodebugpassmanager 2>&1 | FileCheck %s --check-prefix=ENABLED
 ; ENABLED: Running pass: InstCombinePass
 
 target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
index 63ff4be..cc6ff34 100644 (file)
@@ -1,11 +1,9 @@
 ; REQUIRES: x86
 ; RUN: opt -module-summary %s -o %t.o
 
-; Test new-pass-manager and debug-pass-manager option
-; RUN: ld.lld --plugin-opt=new-pass-manager --plugin-opt=debug-pass-manager -o /dev/null %t.o 2>&1 | FileCheck %s
-; RUN: ld.lld --plugin-opt=new-pass-manager --lto-debug-pass-manager -o /dev/null %t.o 2>&1 | FileCheck %s
-; RUN: ld.lld --no-lto-legacy-pass-manager --plugin-opt=debug-pass-manager -o /dev/null %t.o 2>&1 | FileCheck %s
-; RUN: ld.lld --no-lto-legacy-pass-manager --lto-debug-pass-manager -o /dev/null %t.o 2>&1 | FileCheck %s
+; Test debug-pass-manager option
+; RUN: ld.lld --plugin-opt=debug-pass-manager -o /dev/null %t.o 2>&1 | FileCheck %s
+; RUN: ld.lld --lto-debug-pass-manager -o /dev/null %t.o 2>&1 | FileCheck %s
 
 ; CHECK: Running pass: GlobalOptPass
 
index 488f7b0..2171092 100644 (file)
@@ -2,16 +2,16 @@
 ; RUN: opt -module-summary %s -o %t.o
 
 ; Test SLP and Loop Vectorization are enabled by default at O2 and O3.
-; RUN: ld.lld --plugin-opt=new-pass-manager --plugin-opt=debug-pass-manager --plugin-opt=O0 --plugin-opt=save-temps -shared -o %t1.o %t.o 2>&1 | FileCheck %s --check-prefix=CHECK-O0-SLP
+; RUN: ld.lld --plugin-opt=debug-pass-manager --plugin-opt=O0 --plugin-opt=save-temps -shared -o %t1.o %t.o 2>&1 | FileCheck %s --check-prefix=CHECK-O0-SLP
 ; RUN: llvm-dis %t.o.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-O0-LPV
 
-; RUN: ld.lld --plugin-opt=new-pass-manager --plugin-opt=debug-pass-manager --plugin-opt=O1 --plugin-opt=save-temps -shared -o %t2.o %t.o 2>&1 | FileCheck %s --check-prefix=CHECK-O1-SLP
+; RUN: ld.lld --plugin-opt=debug-pass-manager --plugin-opt=O1 --plugin-opt=save-temps -shared -o %t2.o %t.o 2>&1 | FileCheck %s --check-prefix=CHECK-O1-SLP
 ; RUN: llvm-dis %t.o.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-O1-LPV
 
-; RUN: ld.lld --plugin-opt=new-pass-manager --plugin-opt=debug-pass-manager --plugin-opt=O2 --plugin-opt=save-temps -shared -o %t3.o %t.o 2>&1 | FileCheck %s --check-prefix=CHECK-O2-SLP
+; RUN: ld.lld --plugin-opt=debug-pass-manager --plugin-opt=O2 --plugin-opt=save-temps -shared -o %t3.o %t.o 2>&1 | FileCheck %s --check-prefix=CHECK-O2-SLP
 ; RUN: llvm-dis %t.o.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-O2-LPV
 
-; RUN: ld.lld --plugin-opt=new-pass-manager --plugin-opt=debug-pass-manager --plugin-opt=O3 --plugin-opt=save-temps -shared -o %t4.o %t.o 2>&1 | FileCheck %s --check-prefix=CHECK-O3-SLP
+; RUN: ld.lld --plugin-opt=debug-pass-manager --plugin-opt=O3 --plugin-opt=save-temps -shared -o %t4.o %t.o 2>&1 | FileCheck %s --check-prefix=CHECK-O3-SLP
 ; RUN: llvm-dis %t.o.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-O3-LPV
 
 ; CHECK-O0-SLP-NOT: Running pass: SLPVectorizerPass
index a070484..d97d0e1 100644 (file)
@@ -1,10 +1,10 @@
 ; REQUIRES: x86
 ; RUN: llvm-as %s -o %t.o
-; RUN: ld.lld %t.o -o %t2 --no-lto-legacy-pass-manager --lto-debug-pass-manager \
+; RUN: ld.lld %t.o -o %t2 --lto-debug-pass-manager \
 ; RUN:   2>&1 | FileCheck -check-prefix=DEFAULT-NPM %s
-; RUN: ld.lld %t.o -o %t2 --no-lto-legacy-pass-manager --lto-debug-pass-manager \
+; RUN: ld.lld %t.o -o %t2 --lto-debug-pass-manager \
 ; RUN:   -disable-verify 2>&1 | FileCheck -check-prefix=DISABLE-NPM %s
-; RUN: ld.lld %t.o -o %t2 --no-lto-legacy-pass-manager --lto-debug-pass-manager \
+; RUN: ld.lld %t.o -o %t2 --lto-debug-pass-manager \
 ; RUN:   --plugin-opt=disable-verify 2>&1 | FileCheck -check-prefix=DISABLE-NPM %s
 
 target triple = "x86_64-unknown-linux-gnu"
index 5392c89..e35985b 100644 (file)
@@ -5,11 +5,11 @@
 ;; which doesn't know how to handle it.
 
 ; RUN: llvm-as %s -o %t.o
-; RUN: %lld -dylib -lSystem %t.o -o %t --no-lto-legacy-pass-manager
+; RUN: %lld -dylib -lSystem %t.o -o %t
 ; RUN: llvm-objdump -d %t | FileCheck %s
 
 ; RUN: opt -module-summary %s -o %t.o
-; RUN: %lld -dylib -lSystem %t.o -o %t --no-lto-legacy-pass-manager
+; RUN: %lld -dylib -lSystem %t.o -o %t
 ; RUN: llvm-objdump -d %t | FileCheck %s
 
 ; CHECK:      <_foo>:
index 2e89082..377b316 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: llvm-as -o %t.bc %s
-; RUN: wasm-ld --no-lto-legacy-pass-manager --lto-debug-pass-manager -o /dev/null %t.bc 2>&1 | FileCheck %s
+; RUN: wasm-ld --lto-debug-pass-manager -o /dev/null %t.bc 2>&1 | FileCheck %s
 
 ; CHECK: Running pass: GlobalOptPass
 
index 9e9026b..67ed5b5 100644 (file)
@@ -1,7 +1,7 @@
 ; RUN: llvm-as %s -o %t.o
-; RUN: wasm-ld %t.o -o %t2 --no-lto-legacy-pass-manager --lto-debug-pass-manager \
+; RUN: wasm-ld %t.o -o %t2 --lto-debug-pass-manager \
 ; RUN:   2>&1 | FileCheck -check-prefix=DEFAULT-NPM %s
-; RUN: wasm-ld %t.o -o %t2 --no-lto-legacy-pass-manager --lto-debug-pass-manager \
+; RUN: wasm-ld %t.o -o %t2 --lto-debug-pass-manager \
 ; RUN:   -disable-verify 2>&1 | FileCheck -check-prefix=DISABLE-NPM %s
 
 target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128"
index 2871ae6..a47c852 100644 (file)
@@ -265,8 +265,6 @@ def thinlto_cache_dir: JJ<"thinlto-cache-dir=">,
 defm thinlto_cache_policy: EEq<"thinlto-cache-policy", "Pruning policy for the ThinLTO cache">;
 def thinlto_jobs: JJ<"thinlto-jobs=">,
   HelpText<"Number of ThinLTO jobs. Default to --threads=">;
-def no_lto_legacy_pass_manager: FF<"no-lto-legacy-pass-manager">,
-  HelpText<"Use new pass manager">;
 def lto_debug_pass_manager: FF<"lto-debug-pass-manager">,
   HelpText<"Debug new pass manager">;