[llvm-lto] Remove support for legacy pass manager
authorNikita Popov <npopov@redhat.com>
Fri, 8 Apr 2022 08:54:20 +0000 (10:54 +0200)
committerNikita Popov <npopov@redhat.com>
Mon, 11 Apr 2022 07:40:17 +0000 (09:40 +0200)
This removes support for the legacy pass manager in llvm-lto and
llvm-lto2. In this case I've dropped the use-new-pm option entirely,
as I don't think this is considered part of the public interface.

This also makes -debug-pass-manager work with llvm-lto, because
that was needed to migrate some tests to NewPM.

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

34 files changed:
clang/test/Driver/memtag_lto.c
llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h
llvm/test/Analysis/StackSafetyAnalysis/ipa-alias.ll
llvm/test/Analysis/StackSafetyAnalysis/ipa.ll
llvm/test/Feature/load_extension.ll
llvm/test/LTO/Resolution/X86/load-sample-prof-icp.ll
llvm/test/LTO/Resolution/X86/load-sample-prof-lto.ll
llvm/test/LTO/X86/diagnostic-handler-remarks.ll
llvm/test/LTO/X86/disable-verify.ll
llvm/test/LTO/X86/tailcallelim.ll
llvm/test/LTO/X86/tli-nobuiltin.ll
llvm/test/Other/X86/lto-hot-cold-split.ll
llvm/test/ThinLTO/X86/cfi-devirt.ll
llvm/test/ThinLTO/X86/cfi-unsat.ll
llvm/test/ThinLTO/X86/cfi.ll
llvm/test/ThinLTO/X86/devirt-after-icp.ll
llvm/test/ThinLTO/X86/devirt.ll
llvm/test/ThinLTO/X86/devirt2.ll
llvm/test/ThinLTO/X86/devirt_check.ll
llvm/test/ThinLTO/X86/devirt_external_comdat_same_guid.ll
llvm/test/ThinLTO/X86/devirt_local_same_guid.ll
llvm/test/ThinLTO/X86/devirt_promote.ll
llvm/test/ThinLTO/X86/devirt_vcall_vis_hidden.ll
llvm/test/ThinLTO/X86/devirt_vcall_vis_public.ll
llvm/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll
llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll
llvm/test/ThinLTO/X86/newpm-basic.ll
llvm/test/ThinLTO/X86/nodevirt-nonpromoted-typeid.ll
llvm/test/ThinLTO/X86/printer.ll
llvm/test/tools/llvm-lto2/X86/pipeline.ll
llvm/test/tools/llvm-lto2/X86/slp-vectorize-pm.ll
llvm/tools/llvm-lto/llvm-lto.cpp
llvm/tools/llvm-lto2/llvm-lto2.cpp

index 2d3445c..d73670f 100644 (file)
@@ -10,7 +10,7 @@
 // Full LTO
 // RUN: %clang -O1 -target aarch64-unknown-linux -c %s -flto=full -o %t.ltonewpm1.bc
 // RUN: %clang -O1 -target aarch64-unknown-linux -c -DBUILD2 %s -flto=full -o %t.ltonewpm2.bc
-// RUN: llvm-lto2 run -use-new-pm -o %t.ltonewpm %t.ltonewpm1.bc %t.ltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \
+// RUN: llvm-lto2 run -o %t.ltonewpm %t.ltonewpm1.bc %t.ltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \
 // RUN:  -r %t.ltonewpm1.bc,fn,plx \
 // RUN:  -r %t.ltonewpm1.bc,use,lx \
 // RUN:  -r %t.ltonewpm1.bc,use_local,plx \
@@ -21,7 +21,7 @@
 // Thin LTO, new PM
 // RUN: %clang -O1 -target aarch64-unknown-linux -c %s -flto=thin -o %t.thinltonewpm1.bc
 // RUN: %clang -O1 -target aarch64-unknown-linux -c -DBUILD2 %s -flto=thin -o %t.thinltonewpm2.bc
-// RUN: llvm-lto2 run -use-new-pm -o %t.thinltonewpm %t.thinltonewpm1.bc %t.thinltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \
+// RUN: llvm-lto2 run -o %t.thinltonewpm %t.thinltonewpm1.bc %t.thinltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \
 // RUN:  -r %t.thinltonewpm1.bc,fn,plx \
 // RUN:  -r %t.thinltonewpm1.bc,use,lx \
 // RUN:  -r %t.thinltonewpm1.bc,use_local,plx \
@@ -41,7 +41,7 @@
 // Full LTO: both are safe.
 // RUN: %clang -O1 -target aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag -c %s -flto=full -o %t.ltonewpm1.bc
 // RUN: %clang -O1 -target aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag -c -DBUILD2 %s -flto=full -o %t.ltonewpm2.bc
-// RUN: llvm-lto2 run -use-new-pm -o %t.ltonewpm %t.ltonewpm1.bc %t.ltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \
+// RUN: llvm-lto2 run -o %t.ltonewpm %t.ltonewpm1.bc %t.ltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \
 // RUN:  -r %t.ltonewpm1.bc,fn,plx \
 // RUN:  -r %t.ltonewpm1.bc,use,lx \
 // RUN:  -r %t.ltonewpm1.bc,use_local,plx \
@@ -52,7 +52,7 @@
 // Thin LTO: both are safe.
 // RUN: %clang -O1 -target aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag -c %s -flto=thin -o %t.thinltonewpm1.bc
 // RUN: %clang -O1 -target aarch64-unknown-linux -march=armv8+memtag -fsanitize=memtag -c -DBUILD2 %s -flto=thin -o %t.thinltonewpm2.bc
-// RUN: llvm-lto2 run -use-new-pm -o %t.thinltonewpm %t.thinltonewpm1.bc %t.thinltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \
+// RUN: llvm-lto2 run -o %t.thinltonewpm %t.thinltonewpm1.bc %t.thinltonewpm2.bc -save-temps -stack-safety-print -thinlto-threads 1 -O1 \
 // RUN:  -r %t.thinltonewpm1.bc,fn,plx \
 // RUN:  -r %t.thinltonewpm1.bc,use,lx \
 // RUN:  -r %t.thinltonewpm1.bc,use_local,plx \
index 333f483..96f82a9 100644 (file)
@@ -184,7 +184,7 @@ struct LTOCodeGenerator {
 
   void setDisableVerify(bool Value) { Config.DisableVerify = Value; }
 
-  void setUseNewPM(bool Value) { Config.UseNewPM = Value; }
+  void setDebugPassManager(bool Enabled) { Config.DebugPassManager = Enabled; }
 
   void setDiagnosticHandler(lto_diagnostic_handler_t, void *);
 
index fe9aef6..5816f36 100644 (file)
@@ -225,9 +225,6 @@ public:
     OptLevel = (NewOptLevel > 3) ? 3 : NewOptLevel;
   }
 
-  /// Enable or disable the new pass manager.
-  void setUseNewPM(unsigned Enabled) { UseNewPM = Enabled; }
-
   /// Enable or disable debug output for the new pass manager.
   void setDebugPassManager(unsigned Enabled) { DebugPassManager = Enabled; }
 
index 3169ed6..8602bc7 100644 (file)
 ; RUN:  $(cat %t.res.txt) \
 ; RUN:    2>&1 | FileCheck %s --check-prefixes=CHECK,GLOBAL,LTO
 
-; RUN: llvm-lto2 run %t.summ0.bc %t.summ1.bc -o %t-newpm.lto -stack-safety-print -stack-safety-run -save-temps -use-new-pm -thinlto-threads 1 -O0 \
-; RUN:  $(cat %t.res.txt) \
-; RUN:    2>&1 | FileCheck %s --check-prefixes=CHECK,GLOBAL,LTO
-
 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
 target triple = "aarch64-unknown-linux"
 
index ce1761a..1f1b379 100644 (file)
 ; RUN: llvm-lto2 run %t.summ0.bc %t.summ1.bc -o %t.lto -stack-safety-run -thinlto-distributed-indexes -thinlto-threads 1 -O0 $(cat %t.res.txt)
 ; RUN: (cat %t.ids.txt ; llvm-dis %t.summ1.bc.thinlto.bc -o -) | FileCheck --check-prefixes=INDEX %s
 
-; RUN: llvm-lto2 run %t.summ0.bc %t.summ1.bc -o %t-newpm.lto -use-new-pm -stack-safety-print -stack-safety-run -save-temps -thinlto-threads 1 -O0 \
-; RUN:  $(cat %t.res.txt) \
-; RUN:    2>&1 | FileCheck %s --check-prefixes=CHECK,GLOBAL,LTO
-
-; RUN: llvm-lto2 run %t.summ0.bc %t.summ1.bc -o %t-newpm.lto -stack-safety-run -thinlto-distributed-indexes -thinlto-threads 1 -O0 $(cat %t.res.txt)
-; RUN: (cat %t.ids.txt ; llvm-dis %t.summ1.bc.thinlto.bc -o -) | FileCheck --check-prefixes=INDEX %s
-
 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
 target triple = "aarch64-unknown-linux"
 
index 0009bb1..7b140dd 100644 (file)
@@ -3,9 +3,8 @@
 ; RUN: opt %s %loadnewpmbye %loadbye -passes="goodbye" -wave-goodbye -disable-output 2>&1 | FileCheck %s
 ; RUN: opt %s %loadnewpmbye -passes="goodbye" -wave-goodbye -disable-output 2>&1 | FileCheck %s
 ; RUN: opt -module-summary %s -o %t.o
-; RUN: llvm-lto2 run %t.o %loadbye -wave-goodbye -use-new-pm=0 -o %t -r %t.o,somefunk,plx -r %t.o,junk,plx 2>&1 | FileCheck %s
-; RUN: llvm-lto2 run %t.o %loadbye %loadnewpmbye -wave-goodbye -use-new-pm -o %t -r %t.o,somefunk,plx -r %t.o,junk,plx 2>&1 | FileCheck %s
-; RUN: llvm-lto2 run %t.o %loadbye %loadnewpmbye -opt-pipeline="goodbye" -wave-goodbye -use-new-pm -o %t -r %t.o,somefunk,plx -r %t.o,junk,plx 2>&1 | FileCheck %s
+; RUN: llvm-lto2 run %t.o %loadbye %loadnewpmbye -wave-goodbye -o %t -r %t.o,somefunk,plx -r %t.o,junk,plx 2>&1 | FileCheck %s
+; RUN: llvm-lto2 run %t.o %loadbye %loadnewpmbye -opt-pipeline="goodbye" -wave-goodbye -o %t -r %t.o,somefunk,plx -r %t.o,junk,plx 2>&1 | FileCheck %s
 ; REQUIRES: plugins, examples
 ; UNSUPPORTED: windows
 ; CHECK: Bye
index d4af2c4..82d3eb1 100644 (file)
@@ -6,10 +6,6 @@
 ; RUN:   -r %t.bc,test,px -r %t.bc,bar,px -r %t.bc,externfunc,x \
 ; RUN:   -lto-sample-profile-file=%S/Inputs/load-sample-prof-icp.prof
 ; RUN: llvm-dis %t.out.1.4.opt.bc -o - | FileCheck %s
-; RUN: llvm-lto2 run -o %t.out %t.bc -save-temps \
-; RUN:   -r %t.bc,test,px -r %t.bc,bar,px -r %t.bc,externfunc,x -use-new-pm \
-; RUN:   -lto-sample-profile-file=%S/Inputs/load-sample-prof-icp.prof
-; RUN: llvm-dis %t.out.1.4.opt.bc -o - | FileCheck %s
 
 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
index 37c0165..ebbf01a 100644 (file)
@@ -2,18 +2,11 @@
 ;
 ; RUN: opt < %s -o %t.bc
 
-; Run the old pm LTO pipeline.
 ; RUN: llvm-lto2 run -o %t.out %t.bc -save-temps \
 ; RUN:   -r %t.bc,foo,px -r %t.bc,bar,x \
 ; RUN:   -lto-sample-profile-file=%S/Inputs/load-sample-prof.prof
 ; RUN: llvm-dis %t.out.0.4.opt.bc -o - | FileCheck %s
 
-; Run the new pm LTO pipeline.
-; RUN: llvm-lto2 run -o %t.out %t.bc -save-temps -use-new-pm \
-; RUN:   -r %t.bc,foo,px -r %t.bc,bar,x \
-; RUN:   -lto-sample-profile-file=%S/Inputs/load-sample-prof.prof
-; RUN: llvm-dis %t.out.0.4.opt.bc -o - | FileCheck %s
-
 ; Make sure profile information is attached.
 ; CHECK: !prof
 
index 1b33370..7e1793b 100644 (file)
@@ -1,17 +1,15 @@
 ; 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: llvm-lto \
 ; RUN:          -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: llvm-lto \
 ; RUN:          -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: 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: llvm-lto \
 ; RUN:          -use-diagnostic-handler \
 ; RUN:          -exported-symbol _func2 \
 ; RUN:          -exported-symbol _main -o %t.o %t.bc 2>&1 | \
@@ -34,7 +32,7 @@
 
 ; Optimization records are collected regardless of the diagnostic handler
 ; RUN: rm -f %t.yaml
-; RUN: llvm-lto -use-new-pm=false \
+; RUN: llvm-lto \
 ; RUN:          -lto-pass-remarks-output=%t.yaml \
 ; RUN:          -exported-symbol _func2 \
 ; RUN:          -exported-symbol _main -o %t.o %t.bc 2>&1 | \
index 8f34eda..ab53362 100644 (file)
@@ -1,17 +1,14 @@
 ; 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-manager -exported-symbol=_f -o /dev/null %t.bc 2>&1 -disable-verify | FileCheck %s
+; RUN: llvm-lto -debug-pass-manager -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"
 
 ; -disable-verify should disable verification from the optimization pipeline.
-; CHECK: Pass Arguments:
-; CHECK-NOT: -verify {{.*}} -verify
+; CHECK-NOT: Running pass: VerifierPass
 
-; VERIFY: Pass Arguments: {{.*}} -verify {{.*}} -verify
+; VERIFY: Running pass: VerifierPass
 
 define void @f() {
 entry:
index 794e603..a60b79c 100644 (file)
@@ -4,10 +4,7 @@
 ; RUN: llvm-lto -o %t2 %t1 --exported-symbol=foo -save-merged-module
 ; RUN: llvm-dis < %t2.merged.bc | FileCheck %s
 
-; RUN: llvm-lto2 run -r %t1,foo,plx -r %t1,bar,plx -o %t3 %t1 -save-temps
-; RUN: llvm-dis < %t3.0.4.opt.bc | FileCheck %s
-
-; RUN: llvm-lto2 run -r %t1,foo,plx -r %t1,bar,plx -o %t4 %t1 -save-temps -use-new-pm
+; RUN: llvm-lto2 run -r %t1,foo,plx -r %t1,bar,plx -o %t4 %t1 -save-temps
 ; RUN: llvm-dis < %t4.0.4.opt.bc | FileCheck %s
 
 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
index a83e421..1b8fb4b 100644 (file)
@@ -11,7 +11,7 @@
 ; RUN: llvm-nm %t.o | FileCheck %s --check-prefix=LTO-FREESTANDING
 ; LTO-FREESTANDING: fprintf
 
-; Test -lto-freestanding option for LTOBackend & legacy PM.
+; Test -lto-freestanding option for LTOBackend
 
 ; RUN: llvm-lto2 run -r %t.bc,_fprintf,px -r %t.bc,_hello_world,px -r %t.bc,_percent_s,px  -r %t.bc,_foo,px %t.bc -o %t1.o 2>&1
 ; RUN: llvm-nm %t1.o.0 | FileCheck %s --check-prefix=LTO
 ; RUN: llvm-lto2 run -lto-freestanding -r %t.bc,_fprintf,px -r %t.bc,_hello_world,px -r %t.bc,_percent_s,px  -r %t.bc,_foo,px %t.bc -o %t2.o 2>&1
 ; RUN: llvm-nm %t2.o.0 | FileCheck %s --check-prefix=LTO-FREESTANDING
 
-; Test -lto-freestanding option for LTOBackend & new PM.
+; Test -lto-freestanding option for LTOBackend with custom pipeline.
 
-; RUN: llvm-lto2 run -use-new-pm -r %t.bc,_fprintf,px -r %t.bc,_hello_world,px -r %t.bc,_percent_s,px  -r %t.bc,_foo,px %t.bc -o %t1.o 2>&1
+; RUN: llvm-lto2 run -opt-pipeline='default<O3>' -r %t.bc,_fprintf,px -r %t.bc,_hello_world,px -r %t.bc,_percent_s,px  -r %t.bc,_foo,px %t.bc -o %t1.o 2>&1
 ; RUN: llvm-nm %t1.o.0 | FileCheck %s --check-prefix=LTO
 
-; RUN: llvm-lto2 run -use-new-pm -lto-freestanding -r %t.bc,_fprintf,px -r %t.bc,_hello_world,px -r %t.bc,_percent_s,px  -r %t.bc,_foo,px %t.bc -o %t2.o 2>&1
-; RUN: llvm-nm %t2.o.0 | FileCheck %s --check-prefix=LTO-FREESTANDING
-
-; Test -lto-freestanding option for LTOBackend & new PM with custom pipeline.
-
-; RUN: llvm-lto2 run -use-new-pm -opt-pipeline='default<O3>' -r %t.bc,_fprintf,px -r %t.bc,_hello_world,px -r %t.bc,_percent_s,px  -r %t.bc,_foo,px %t.bc -o %t1.o 2>&1
-; RUN: llvm-nm %t1.o.0 | FileCheck %s --check-prefix=LTO
-
-; RUN: llvm-lto2 run -use-new-pm -opt-pipeline='default<O3>' -lto-freestanding -r %t.bc,_fprintf,px -r %t.bc,_hello_world,px -r %t.bc,_percent_s,px  -r %t.bc,_foo,px %t.bc -o %t2.o 2>&1
+; RUN: llvm-lto2 run -opt-pipeline='default<O3>' -lto-freestanding -r %t.bc,_fprintf,px -r %t.bc,_hello_world,px -r %t.bc,_percent_s,px  -r %t.bc,_foo,px %t.bc -o %t2.o 2>&1
 ; RUN: llvm-nm %t2.o.0 | FileCheck %s --check-prefix=LTO-FREESTANDING
 
 
index dda1437..22c79c7 100644 (file)
@@ -1,14 +1,12 @@
 ; 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 \
+; RUN:          -thinlto-action=run %t.bc -debug-pass-manager 2>&1 | FileCheck %s -check-prefix=OLDPM-ANYLTO-POSTLINK-Os
+; RUN: llvm-lto -hot-cold-split=true \
+; RUN:          %t.bc -debug-pass-manager 2>&1 | FileCheck %s -check-prefix=OLDPM-ANYLTO-POSTLINK-Os
 
 ; REQUIRES: asserts
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
-; OLDPM-ANYLTO-POSTLINK-Os: Hot Cold Splitting
+; OLDPM-ANYLTO-POSTLINK-Os: HotColdSplittingPass
index 61e0c16..4ad6090 100644 (file)
@@ -4,7 +4,6 @@
 
 ; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t.o %s
 
-; Legacy PM
 ; RUN: llvm-lto2 run %t.o -save-temps -pass-remarks=. \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -o %t3 \
 ; RUN:   -r=%t.o,_ZTV1C,px 2>&1 | FileCheck %s --check-prefix=REMARK
 ; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
 
-; New PM
-; RUN: llvm-lto2 run %t.o -save-temps -use-new-pm -pass-remarks=. \
-; RUN:   -whole-program-visibility \
-; RUN:   -o %t3 \
-; RUN:   -r=%t.o,test,px \
-; RUN:   -r=%t.o,_ZN1A1nEi,p \
-; RUN:   -r=%t.o,_ZN1B1fEi,p \
-; RUN:   -r=%t.o,_ZN1C1fEi,p \
-; RUN:   -r=%t.o,empty,p \
-; RUN:   -r=%t.o,_ZTV1B, \
-; RUN:   -r=%t.o,_ZTV1C, \
-; RUN:   -r=%t.o,_ZN1A1nEi, \
-; RUN:   -r=%t.o,_ZN1B1fEi, \
-; RUN:   -r=%t.o,_ZN1C1fEi, \
-; RUN:   -r=%t.o,_ZTV1B,px \
-; RUN:   -r=%t.o,_ZTV1C,px 2>&1 | FileCheck %s --check-prefix=REMARK
-; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
-
 ; REMARK: single-impl: devirtualized a call to _ZN1A1nEi
 
 ; Next check that we emit an error when trying to LTO link this module
index c22ba8f..fffe077 100644 (file)
@@ -15,7 +15,7 @@
 ; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t.o %s
 ; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t1.o %p/Inputs/cfi-unsat.ll
 
-; RUN: llvm-lto2 run %t.o %t1.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t.o %t1.o -save-temps -pass-remarks=. \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -o %t3 \
 ; RUN:   -r=%t.o,test2,px \
index e406009..3153406 100644 (file)
@@ -4,7 +4,6 @@
 
 ; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t.o %s
 
-; Legacy PM
 ; RUN: llvm-lto2 run -save-temps %t.o \
 ; RUN:   -o %t3 \
 ; RUN:   -r=%t.o,test,px \
 ; RUN:   -r=%t.o,_ZTV1B,px
 ; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
 
-; New PM
-; RUN: llvm-lto2 run -save-temps %t.o -use-new-pm \
-; RUN:   -o %t3 \
-; RUN:   -r=%t.o,test,px \
-; RUN:   -r=%t.o,_ZTV1B, \
-; RUN:   -r=%t.o,_ZN1B1fEi, \
-; RUN:   -r=%t.o,_ZTV1B,px
-; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
-
 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-grtev4-linux-gnu"
 
index e4ac554..7c1cec4 100644 (file)
@@ -44,7 +44,6 @@
 
 ; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t.o %s
 
-; Legacy PM
 ; RUN: llvm-lto2 run %t.o -save-temps -pass-remarks=. \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -o %t3 \
 ; RUN:   -r=%t.o,_ZTV1B,px 2>&1 | FileCheck %s --check-prefix=REMARK
 ; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
 
-; New PM
-; RUN: llvm-lto2 run %t.o -save-temps -use-new-pm -pass-remarks=. \
-; RUN:   -whole-program-visibility \
-; RUN:   -o %t3 \
-; RUN:   -r=%t.o,_Z3bazP1A,px \
-; RUN:   -r=%t.o,_ZN1A3fooEv, \
-; RUN:   -r=%t.o,_ZN1A3barEv, \
-; RUN:   -r=%t.o,_ZN1B3fooEv, \
-; RUN:   -r=%t.o,_ZN1B3barEv, \
-; RUN:   -r=%t.o,_ZTV1A, \
-; RUN:   -r=%t.o,_ZTV1B, \
-; RUN:   -r=%t.o,_ZN1A3fooEv, \
-; RUN:   -r=%t.o,_ZN1A3barEv, \
-; RUN:   -r=%t.o,_ZN1B3fooEv, \
-; RUN:   -r=%t.o,_ZN1B3barEv, \
-; RUN:   -r=%t.o,_ZTV1A,px \
-; RUN:   -r=%t.o,_ZTV1B,px 2>&1 | FileCheck %s --check-prefix=REMARK
-; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
-
 ; We should only devirtualize the inlined call to bar().
 ; REMARK-NOT: single-impl: devirtualized a call to _ZN1B3fooEv
 ; REMARK: single-impl: devirtualized a call to _ZN1B3barEv
index 9ba1dc2..cf7d583 100644 (file)
@@ -33,7 +33,7 @@
 ; Type Id on _ZTV1D should have been promoted
 ; NOENABLESPLITFLAG-DAG: typeidCompatibleVTable: (name: "1.{{.*}}", summary: ((offset: 16, [[D]])))
 
-; Legacy PM, Index based WPD
+; Index based WPD
 ; RUN: llvm-lto2 run %t2.o -save-temps -pass-remarks=. \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -o %t3 \
 ; RUN:   -r=%t2.o,_ZTV1C,px \
 ; RUN:   -r=%t2.o,_ZTV1D,px 2>&1 | FileCheck %s --check-prefix=SKIP
 
-; New PM, Index based WPD
-; RUN: llvm-lto2 run %t2.o -save-temps -use-new-pm -pass-remarks=. \
-; RUN:   -whole-program-visibility \
-; RUN:   -o %t3 \
-; RUN:   -r=%t2.o,test,px \
-; RUN:   -r=%t2.o,_ZN1A1nEi,p \
-; RUN:   -r=%t2.o,_ZN1B1fEi,p \
-; RUN:   -r=%t2.o,_ZN1C1fEi,p \
-; RUN:   -r=%t2.o,_ZN1D1mEi,p \
-; RUN:   -r=%t2.o,_ZTV1B,px \
-; RUN:   -r=%t2.o,_ZTV1C,px \
-; RUN:   -r=%t2.o,_ZTV1D,px 2>&1 | FileCheck %s --check-prefix=REMARK
-; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
-
-; Legacy PM
 ; FIXME: Fix machine verifier issues and remove -verify-machineinstrs=0. PR39436.
 ; RUN: llvm-lto2 run %t.o -save-temps -pass-remarks=. \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -r=%t.o,_ZTV1D,px 2>&1 | FileCheck %s --check-prefix=REMARK --dump-input=fail
 ; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
 
-; New PM
-; FIXME: Fix machine verifier issues and remove -verify-machineinstrs=0. PR39436.
-; RUN: llvm-lto2 run %t.o -save-temps -use-new-pm -pass-remarks=. \
-; RUN:   -whole-program-visibility \
-; RUN:   -verify-machineinstrs=0 \
-; RUN:   -o %t3 \
-; RUN:   -r=%t.o,test,px \
-; RUN:   -r=%t.o,_ZN1A1nEi,p \
-; RUN:   -r=%t.o,_ZN1B1fEi,p \
-; RUN:   -r=%t.o,_ZN1C1fEi,p \
-; RUN:   -r=%t.o,_ZN1D1mEi,p \
-; RUN:   -r=%t.o,_ZTV1B, \
-; RUN:   -r=%t.o,_ZTV1C, \
-; RUN:   -r=%t.o,_ZTV1D, \
-; RUN:   -r=%t.o,_ZN1A1nEi, \
-; RUN:   -r=%t.o,_ZN1B1fEi, \
-; RUN:   -r=%t.o,_ZN1C1fEi, \
-; RUN:   -r=%t.o,_ZN1D1mEi, \
-; RUN:   -r=%t.o,_ZTV1B,px \
-; RUN:   -r=%t.o,_ZTV1C,px \
-; RUN:   -r=%t.o,_ZTV1D,px 2>&1 | FileCheck %s --check-prefix=REMARK --dump-input=fail
-; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
-
 ; REMARK-DAG: single-impl: devirtualized a call to _ZN1A1nEi
 ; REMARK-DAG: single-impl: devirtualized a call to _ZN1D1mEi
 
index 42c15f1..0a10a40 100644 (file)
@@ -36,7 +36,7 @@
 ; NOENABLESPLITFLAG-DAG: typeidCompatibleVTable: (name: "_ZTS1C", summary: ((offset: 16, [[C]])))
 ; NOENABLESPLITFLAG-DAG: typeidCompatibleVTable: (name: "_ZTS1D", summary: ((offset: 16, [[D]])))
 
-; Legacy PM, Index based WPD
+; Index based WPD
 ; RUN: llvm-lto2 run %t3.o %t4.o -save-temps -pass-remarks=. \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -wholeprogramdevirt-print-index-based \
 ; RUN: llvm-nm %t5.1 | FileCheck %s --check-prefix=NM-INDEX1
 ; RUN: llvm-nm %t5.2 | FileCheck %s --check-prefix=NM-INDEX2
 
-; New PM, Index based WPD
-; RUN: llvm-lto2 run %t3.o %t4.o -save-temps -use-new-pm -pass-remarks=. \
-; RUN:   -whole-program-visibility \
-; RUN:   -wholeprogramdevirt-print-index-based \
-; RUN:   -o %t5 \
-; RUN:   -r=%t3.o,test,px \
-; RUN:   -r=%t3.o,_ZTV1B, \
-; RUN:   -r=%t3.o,_ZTV1C, \
-; RUN:   -r=%t3.o,_ZTV1D, \
-; RUN:   -r=%t3.o,_ZN1D1mEi, \
-; RUN:   -r=%t3.o,test2, \
-; RUN:   -r=%t4.o,_ZN1B1fEi,p \
-; RUN:   -r=%t4.o,_ZN1C1fEi,p \
-; RUN:   -r=%t4.o,_ZN1D1mEi,p \
-; RUN:   -r=%t4.o,test2,px \
-; RUN:   -r=%t4.o,_ZTV1B,px \
-; RUN:   -r=%t4.o,_ZTV1C,px \
-; RUN:   -r=%t4.o,_ZTV1D,px \
-; RUN:   -r=%t4.o,_ZTV1E,px 2>&1 | FileCheck %s --check-prefix=REMARK --check-prefix=PRINT
-; RUN: llvm-dis %t5.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR1
-; RUN: llvm-dis %t5.2.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR2
-; RUN: llvm-nm %t5.1 | FileCheck %s --check-prefix=NM-INDEX1
-; RUN: llvm-nm %t5.2 | FileCheck %s --check-prefix=NM-INDEX2
-
 ; NM-INDEX1-DAG: U _ZN1A1nEi.llvm.
 ; NM-INDEX1-DAG: U _ZN1E1mEi.llvm.
 ; NM-INDEX1-DAG: U _ZN1D1mEi
@@ -95,7 +71,7 @@
 ; NM-INDEX2-DAG: t _ZN1C1fEi
 
 ; Index based WPD, distributed backends
-; RUN: llvm-lto2 run %t3.o %t4.o -save-temps -use-new-pm \
+; RUN: llvm-lto2 run %t3.o %t4.o -save-temps \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -thinlto-distributed-indexes -wholeprogramdevirt-print-index-based \
 ; RUN:   -o %t5 \
 ; PRINT-DAG: Devirtualized call to {{.*}} (_ZN1E1mEi)
 ; PRINT-DAG: Devirtualized call to {{.*}} (_ZN1D1mEi)
 
-; Legacy PM
-; RUN: llvm-lto2 run %t1.o %t2.o -save-temps -pass-remarks=. \
-; RUN:   -whole-program-visibility \
-; RUN:   -o %t5 \
-; RUN:   -r=%t1.o,test,px \
-; RUN:   -r=%t1.o,_ZTV1B, \
-; RUN:   -r=%t1.o,_ZTV1C, \
-; RUN:   -r=%t1.o,_ZTV1D, \
-; RUN:   -r=%t1.o,_ZTV1D, \
-; RUN:   -r=%t1.o,_ZN1D1mEi, \
-; RUN:   -r=%t1.o,_ZN1D1mEi, \
-; RUN:   -r=%t1.o,test2, \
-; RUN:   -r=%t2.o,_ZN1A1nEi,p \
-; RUN:   -r=%t2.o,_ZN1B1fEi,p \
-; RUN:   -r=%t2.o,_ZN1C1fEi,p \
-; RUN:   -r=%t2.o,_ZN1D1mEi,p \
-; RUN:   -r=%t2.o,_ZN1E1mEi,p \
-; RUN:   -r=%t2.o,_ZTV1B, \
-; RUN:   -r=%t2.o,_ZTV1C, \
-; RUN:   -r=%t2.o,_ZTV1D, \
-; RUN:   -r=%t2.o,_ZTV1E, \
-; RUN:   -r=%t2.o,test2,px \
-; RUN:   -r=%t2.o,_ZN1A1nEi, \
-; RUN:   -r=%t2.o,_ZN1B1fEi, \
-; RUN:   -r=%t2.o,_ZN1C1fEi, \
-; RUN:   -r=%t2.o,_ZN1D1mEi, \
-; RUN:   -r=%t2.o,_ZN1E1mEi, \
-; RUN:   -r=%t2.o,_ZTV1B,px \
-; RUN:   -r=%t2.o,_ZTV1C,px \
-; RUN:   -r=%t2.o,_ZTV1D,px \
-; RUN:   -r=%t2.o,_ZTV1E,px 2>&1 | FileCheck %s --check-prefix=REMARK
-; RUN: llvm-dis %t5.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR1
-; RUN: llvm-dis %t5.2.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR2
-; RUN: llvm-nm %t5.1 | FileCheck %s --check-prefix=NM-HYBRID1
-; RUN: llvm-nm %t5.2 | FileCheck %s --check-prefix=NM-HYBRID2
-
 ; New PM
-; RUN: llvm-lto2 run %t1.o %t2.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t1.o %t2.o -save-temps -pass-remarks=. \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -o %t5 \
 ; RUN:   -r=%t1.o,test,px \
index a16c828..63a64cb 100644 (file)
@@ -10,7 +10,7 @@
 ; RUN: opt -thinlto-bc -o %t2.o %s
 
 ; Check first in trapping mode.
-; RUN: llvm-lto2 run %t2.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t2.o -save-temps -pass-remarks=. \
 ; RUN:  -wholeprogramdevirt-check=trap \
 ; RUN:   -o %t3 \
 ; RUN:   -r=%t2.o,test,px \
@@ -20,7 +20,7 @@
 ; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK --check-prefix=TRAP
 
 ; Check next in fallback mode.
-; RUN: llvm-lto2 run %t2.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t2.o -save-temps -pass-remarks=. \
 ; RUN:  -wholeprogramdevirt-check=fallback \
 ; RUN:   -o %t3 \
 ; RUN:   -r=%t2.o,test,px \
index ce2f9b7..fbcaba9 100644 (file)
@@ -7,7 +7,7 @@
 ; RUN: opt -thinlto-bc -o %t3.o %s
 ; RUN: opt -thinlto-bc -o %t4.o %p/Inputs/devirt_external_comdat_same_guid.ll
 
-; RUN: llvm-lto2 run %t3.o %t4.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t3.o %t4.o -save-temps -pass-remarks=. \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -wholeprogramdevirt-print-index-based \
 ; RUN:   -o %t5 \
index 8354bc1..4dd8a8d 100644 (file)
@@ -7,7 +7,7 @@
 ; RUN: opt -thinlto-bc -o %t3.o %s
 ; RUN: opt -thinlto-bc -o %t4.o %p/Inputs/devirt_local_same_guid.ll
 
-; RUN: llvm-lto2 run %t3.o %t4.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t3.o %t4.o -save-temps -pass-remarks=. \
 ; RUN:   -wholeprogramdevirt-print-index-based \
 ; RUN:   -o %t5 \
 ; RUN:   -r=%t3.o,use_B,px \
index 367c728..e978d54 100644 (file)
@@ -9,7 +9,7 @@
 ; RUN: opt -thinlto-bc -o %t3.o %s
 ; RUN: opt -thinlto-bc -o %t4.o %p/Inputs/devirt_promote.ll
 
-; RUN: llvm-lto2 run %t3.o %t4.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t3.o %t4.o -save-temps -pass-remarks=. \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -wholeprogramdevirt-print-index-based \
 ; RUN:   -o %t5 \
index 7a30149..c416b8f 100644 (file)
@@ -6,7 +6,7 @@
 ; Index based WPD
 ; Generate unsplit module with summary for ThinLTO index-based WPD.
 ; RUN: opt -thinlto-bc -o %t2.o %s
-; RUN: llvm-lto2 run %t2.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t2.o -save-temps -pass-remarks=. \
 ; RUN:   -o %t3 \
 ; RUN:   -r=%t2.o,test,px \
 ; RUN:   -r=%t2.o,_ZN1A1nEi,p \
@@ -22,7 +22,7 @@
 ; Generate split module with summary for hybrid Thin/Regular LTO WPD.
 ; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t.o %s
 ; FIXME: Fix machine verifier issues and remove -verify-machineinstrs=0. PR39436.
-; RUN: llvm-lto2 run %t.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t.o -save-temps -pass-remarks=. \
 ; RUN:   -verify-machineinstrs=0 \
 ; RUN:   -o %t3 \
 ; RUN:   -r=%t.o,test,px \
@@ -44,7 +44,7 @@
 
 ; Regular LTO WPD
 ; RUN: opt -o %t4.o %s
-; RUN: llvm-lto2 run %t4.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t4.o -save-temps -pass-remarks=. \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -o %t5 \
 ; RUN:   -r=%t4.o,test,px \
index 468237b..d0061bc 100644 (file)
@@ -6,7 +6,7 @@
 ; Index based WPD
 ; Generate unsplit module with summary for ThinLTO index-based WPD.
 ; RUN: opt -thinlto-bc -o %t2.o %s
-; RUN: llvm-lto2 run %t2.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t2.o -save-temps -pass-remarks=. \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -o %t3 \
 ; RUN:   -r=%t2.o,test,px \
@@ -23,7 +23,7 @@
 ; Generate split module with summary for hybrid Thin/Regular LTO WPD.
 ; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t.o %s
 ; FIXME: Fix machine verifier issues and remove -verify-machineinstrs=0. PR39436.
-; RUN: llvm-lto2 run %t.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t.o -save-temps -pass-remarks=. \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -verify-machineinstrs=0 \
 ; RUN:   -o %t3 \
@@ -46,7 +46,7 @@
 
 ; Regular LTO WPD
 ; RUN: opt -o %t4.o %s
-; RUN: llvm-lto2 run %t4.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t4.o -save-temps -pass-remarks=. \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -o %t5 \
 ; RUN:   -r=%t4.o,test,px \
@@ -66,7 +66,7 @@
 ; WPD fails
 
 ; Index based WPD
-; RUN: llvm-lto2 run %t2.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t2.o -save-temps -pass-remarks=. \
 ; RUN:   -o %t3 \
 ; RUN:   -r=%t2.o,test,px \
 ; RUN:   -r=%t2.o,_ZN1A1nEi,p \
@@ -79,7 +79,7 @@
 ; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-NODEVIRT-IR
 
 ; Hybrid WPD
-; RUN: llvm-lto2 run %t.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t.o -save-temps -pass-remarks=. \
 ; RUN:   -verify-machineinstrs=0 \
 ; RUN:   -o %t3 \
 ; RUN:   -r=%t.o,test,px \
 ; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-NODEVIRT-IR
 
 ; Regular LTO WPD
-; RUN: llvm-lto2 run %t4.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t4.o -save-temps -pass-remarks=. \
 ; RUN:   -o %t5 \
 ; RUN:   -r=%t4.o,test,px \
 ; RUN:   -r=%t4.o,_ZN1A1nEi,p \
 ; Try index-based WPD again with both -whole-program-visibility and
 ; -disable-whole-program-visibility to confirm the latter overrides
 ; the former and that WPD fails.
-; RUN: llvm-lto2 run %t2.o -save-temps -use-new-pm -pass-remarks=. \
+; RUN: llvm-lto2 run %t2.o -save-temps -pass-remarks=. \
 ; RUN:   -whole-program-visibility \
 ; RUN:   -disable-whole-program-visibility \
 ; RUN:   -o %t3 \
index 937b825..76a76fd 100644 (file)
@@ -5,7 +5,6 @@
 ; with -lto-pass-remarks-with-hotness.
 
 ; RUN: llvm-lto -thinlto-action=run \
-; RUN:          -use-new-pm=false \
 ; RUN:          -lto-pass-remarks-output=%t.yaml \
 ; RUN:          -lto-pass-remarks-with-hotness \
 ; RUN:          -exported-symbol _func2 \
@@ -18,6 +17,7 @@
 ; Verify that bar is imported 'and' inlined into 'foo'
 ; RUN: cat %t.yaml.thin.0.yaml | FileCheck %s -check-prefix=YAML1
 ; YAML1:      --- !Passed
+; YAML1:      --- !Passed
 ; YAML1-NEXT: Pass:            inline
 ; YAML1-NEXT: Name:            Inlined
 ; YAML1-NEXT: Function:        main
@@ -32,7 +32,7 @@
 ; YAML1-NEXT:   - String:          '(cost='
 ; YAML1-NEXT:   - Cost:            '-30'
 ; YAML1-NEXT:   - String:          ', threshold='
-; YAML1-NEXT:   - Threshold:       '337'
+; YAML1-NEXT:   - Threshold:       '375'
 ; YAML1-NEXT:   - String:          ')'
 ; YAML1-NEXT: ...
 
@@ -53,7 +53,7 @@
 ; YAML2-NEXT:   - String:          '(cost='
 ; YAML2-NEXT:   - Cost:            '-30'
 ; YAML2-NEXT:   - String:          ', threshold='
-; YAML2-NEXT:   - Threshold:       '337'
+; YAML2-NEXT:   - Threshold:       '375'
 ; YAML2-NEXT:   - String:          ')'
 ; YAML2-NEXT: ...
 
index ee61953..fd76af0 100644 (file)
@@ -4,7 +4,6 @@
 ; Optimization records are collected regardless of the diagnostic handler
 ; RUN: rm -f %t.yaml.thin.0.yaml %t.yaml.thin.1.yaml
 ; RUN: llvm-lto -thinlto-action=run \
-; RUN:          -use-new-pm=false \
 ; RUN:          -lto-pass-remarks-output=%t.yaml \
 ; RUN:          -lto-pass-remarks-filter=inline \
 ; RUN:          -lto-pass-remarks-format=yaml \
@@ -18,6 +17,7 @@
 ; Verify that bar is imported 'and' inlined into 'foo'
 ; RUN: cat %t.yaml.thin.0.yaml | FileCheck %s -check-prefix=YAML1
 ; YAML1:      --- !Passed
+; YAML1:      --- !Passed
 ; YAML1-NEXT: Pass:            inline
 ; YAML1-NEXT: Name:            Inlined
 ; YAML1-NEXT: Function:        main
@@ -31,7 +31,7 @@
 ; YAML1-NEXT:   - String:          '(cost='
 ; YAML1-NEXT:   - Cost:            '-30'
 ; YAML1-NEXT:   - String:          ', threshold='
-; YAML1-NEXT:   - Threshold:       '337'
+; YAML1-NEXT:   - Threshold:       '375'
 ; YAML1-NEXT:   - String:          ')'
 ; YAML1-NEXT: ...
 
@@ -52,7 +52,7 @@
 ; YAML2-NEXT:   - String:          '(cost='
 ; YAML2-NEXT:   - Cost:            '-30'
 ; YAML2-NEXT:   - String:          ', threshold='
-; YAML2-NEXT:   - Threshold:       '337'
+; YAML2-NEXT:   - Threshold:       '375'
 ; YAML2-NEXT:   - String:          ')'
 ; YAML2-NEXT: ...
 
index a17b5cb..bd8a55b 100644 (file)
@@ -2,29 +2,18 @@
 ; RUN: llvm-lto2 run %t1.bc -o %t.o \
 ; RUN:     -r=%t1.bc,_tinkywinky,pxl \
 ; RUN:     -debug-pass-manager \
-; RUN:     -use-new-pm 2>&1 | FileCheck --check-prefix=NEWPM %s
+; RUN:     2>&1 | FileCheck %s
 
 ; RUN: llvm-lto -thinlto-action=run -exported-symbol tinkywinky \
-; RUN:          -use-new-pm \
 ; RUN:          -debug-pass-manager \
-; RUN:          %t1.bc 2>&1 | FileCheck --check-prefix=NEWPM %s
-
-; RUN: llvm-lto -thinlto-action=run -exported-symbol tinkywinky \
-; RUN:          -use-new-pm=false \
-; RUN:          -debug-pass-manager \
-; RUN:          -debug-pass=Structure \
-; RUN:          %t1.bc 2>&1 | FileCheck --check-prefix=LEGACYPM %s
+; RUN:          %t1.bc 2>&1 | FileCheck %s
 
 ; Check that the selected pass manager is used for middle-end optimizations by
 ; checking the debug output for IPSCCP.
 
-; NEWPM-NOT: Interprocedural Sparse Conditional Constant Propagation
-; NEWPM: Running pass: IPSCCPPass on [module]
-; NEWPM-NOT: Interprocedural Sparse Conditional Constant Propagation
-
-; LEGACYPM-NOT: IPSCCPPass
-; LEGACYPM:  Interprocedural Sparse Conditional Constant Propagation
-; LEGACYPM-NOT: IPSCCPPass
+; CHECK-NOT: Interprocedural Sparse Conditional Constant Propagation
+; CHECK: Running pass: IPSCCPPass on [module]
+; CHECK-NOT: Interprocedural Sparse Conditional Constant Propagation
 
 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.11.0"
index 3669db7..d759bcf 100644 (file)
 ; DIS-NOT: typeIdInfo
 ; DIS-NOT: typeidMetadata
 
-; Legacy PM, Index based WPD
+; Index based WPD
 ; RUN: llvm-lto2 run %t2.o -save-temps -pass-remarks=. \
 ; RUN:   -o %t3 \
 ; RUN:   -r=%t2.o,test,plx \
 ; RUN:   -r=%t2.o,_ZN1D1mEi,
 ; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
 
-; New PM, Index based WPD
-; RUN: llvm-lto2 run %t2.o -save-temps -use-new-pm -pass-remarks=. \
-; RUN:   -o %t3 \
-; RUN:   -r=%t2.o,test,plx \
-; RUN:   -r=%t2.o,_ZN1D1mEi,
-; RUN: llvm-dis %t3.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-IR
-
 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-grtev4-linux-gnu"
 
index 3ba8189..88a9cbe 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: llvm-as %s -o %t.bc
-; RUN: llvm-lto2 run -r=%t.bc,foo,pxl -use-new-pm --print-before-all %t.bc -o %t2 2>&1 | FileCheck %s --check-prefix=CHECK-BEFORE
-; RUN: llvm-lto2 run -r=%t.bc,foo,pxl -use-new-pm --print-after-all %t.bc -o %t3 2>&1 | FileCheck %s --check-prefix=CHECK-AFTER
+; RUN: llvm-lto2 run -r=%t.bc,foo,pxl --print-before-all %t.bc -o %t2 2>&1 | FileCheck %s --check-prefix=CHECK-BEFORE
+; RUN: llvm-lto2 run -r=%t.bc,foo,pxl --print-after-all %t.bc -o %t3 2>&1 | FileCheck %s --check-prefix=CHECK-AFTER
 ; CHECK-BEFORE: *** IR Dump Before GlobalDCEPass
 ; CHECK-AFTER: *** IR Dump After GlobalDCEPass
 
index abc2f20..37568dc 100644 (file)
@@ -2,7 +2,7 @@
 
 ; Try the default pipeline and check is BasicAA is invoked.
 ; RUN: llvm-lto2 run %t1.bc -o %t.o -r %t1.bc,patatino,px -debug-pass-manager \
-; RUN:  -use-new-pm 2>&1 | FileCheck %s --check-prefix=DEFAULT
+; RUN:  2>&1 | FileCheck %s --check-prefix=DEFAULT
 ; DEFAULT: Running analysis: BasicAA on patatino
 
 ; Try a custom pipeline
@@ -13,7 +13,7 @@
 
 ; Try the new pass manager LTO default pipeline (make sure the option
 ; is accepted).
-; RUN: llvm-lto2 run %t1.bc -o %t.o -use-new-pm -r %t1.bc,patatino,px
+; RUN: llvm-lto2 run %t1.bc -o %t.o -r %t1.bc,patatino,px
 
 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
index 2d9ef9d..b114bf6 100644 (file)
@@ -2,19 +2,19 @@
 
 ; Test SLP and Loop Vectorization are enabled by default at O2 and O3.
 ; RUN: llvm-lto2 run %t1.bc -o %t2.o -O0 -r %t1.bc,foo,plx -debug-pass-manager \
-; RUN:  -use-new-pm -save-temps 2>&1 | FileCheck %s --check-prefix=CHECK-O0-SLP
+; RUN:  -save-temps 2>&1 | FileCheck %s --check-prefix=CHECK-O0-SLP
 ; RUN: llvm-dis %t2.o.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-O0-LPV
 
 ; RUN: llvm-lto2 run %t1.bc -o %t3.o -O1 -r %t1.bc,foo,plx -debug-pass-manager \
-; RUN:  -use-new-pm -save-temps 2>&1 | FileCheck %s --check-prefix=CHECK-O1-SLP
+; RUN:  -save-temps 2>&1 | FileCheck %s --check-prefix=CHECK-O1-SLP
 ; RUN: llvm-dis %t3.o.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-O1-LPV
 
 ; RUN: llvm-lto2 run %t1.bc -o %t4.o -O2 -r %t1.bc,foo,plx -debug-pass-manager \
-; RUN:  -use-new-pm -save-temps 2>&1 | FileCheck %s --check-prefix=CHECK-O2-SLP
+; RUN:  -save-temps 2>&1 | FileCheck %s --check-prefix=CHECK-O2-SLP
 ; RUN: llvm-dis %t4.o.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-O2-LPV
 
 ; RUN: llvm-lto2 run %t1.bc -o %t5.o -O3 -r %t1.bc,foo,plx -debug-pass-manager \
-; RUN:  -use-new-pm -save-temps 2>&1 | FileCheck %s --check-prefix=CHECK-O3-SLP
+; RUN:  -save-temps 2>&1 | FileCheck %s --check-prefix=CHECK-O3-SLP
 ; RUN: llvm-dis %t5.o.1.4.opt.bc -o - | FileCheck %s --check-prefix=CHECK-O3-LPV
 
 ; CHECK-O0-SLP-NOT: Running pass: SLPVectorizerPass
index 8d58d39..9a5bc39 100644 (file)
@@ -257,11 +257,6 @@ static cl::opt<bool> PrintMachOCPUOnly(
     cl::cat(LTOCategory));
 
 static cl::opt<bool>
-    UseNewPM("use-new-pm",
-             cl::desc("Run LTO passes using the new pass manager"),
-             cl::init(true), cl::Hidden, cl::cat(LTOCategory));
-
-static cl::opt<bool>
     DebugPassManager("debug-pass-manager", cl::init(false), cl::Hidden,
                      cl::desc("Print pass management debugging information"),
                      cl::cat(LTOCategory));
@@ -605,7 +600,6 @@ public:
     ThinGenerator.setCacheMaxSizeFiles(ThinLTOCacheMaxSizeFiles);
     ThinGenerator.setCacheMaxSizeBytes(ThinLTOCacheMaxSizeBytes);
     ThinGenerator.setFreestanding(EnableFreestanding);
-    ThinGenerator.setUseNewPM(UseNewPM);
     ThinGenerator.setDebugPassManager(DebugPassManager);
 
     // Add all the exported symbols to the table of symbols to preserve.
@@ -1016,6 +1010,7 @@ int main(int argc, char **argv) {
 
   CodeGen.setCodePICModel(codegen::getExplicitRelocModel());
   CodeGen.setFreestanding(EnableFreestanding);
+  CodeGen.setDebugPassManager(DebugPassManager);
 
   CodeGen.setDebugInfo(LTO_DEBUG_MODEL_DWARF);
   CodeGen.setTargetOptions(Options);
@@ -1070,8 +1065,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());
 
index 7ca10c7..a4ba545 100644 (file)
@@ -144,11 +144,6 @@ static cl::opt<bool>
                  cl::init(false), cl::Hidden);
 
 static cl::opt<bool>
-    UseNewPM("use-new-pm",
-             cl::desc("Run LTO passes using the new pass manager"),
-             cl::init(true), cl::Hidden);
-
-static cl::opt<bool>
     DebugPassManager("debug-pass-manager", cl::init(false), cl::Hidden,
                      cl::desc("Print pass management debugging information"));
 
@@ -267,7 +262,6 @@ static int run(int argc, char **argv) {
   Conf.AAPipeline = AAPipeline;
 
   Conf.OptLevel = OptLevel - '0';
-  Conf.UseNewPM = UseNewPM;
   Conf.Freestanding = EnableFreestanding;
   for (auto &PluginFN : PassPlugins)
     Conf.PassPlugins.push_back(PluginFN);