diff --git a/clang/test/Driver/memtag_lto.c b/clang/test/Driver/memtag_lto.c --- a/clang/test/Driver/memtag_lto.c +++ b/clang/test/Driver/memtag_lto.c @@ -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 \ diff --git a/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h b/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h --- a/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h +++ b/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h @@ -184,7 +184,7 @@ 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 *); diff --git a/llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h b/llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h --- a/llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h +++ b/llvm/include/llvm/LTO/legacy/ThinLTOCodeGenerator.h @@ -225,9 +225,6 @@ 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; } diff --git a/llvm/test/Analysis/StackSafetyAnalysis/ipa-alias.ll b/llvm/test/Analysis/StackSafetyAnalysis/ipa-alias.ll --- a/llvm/test/Analysis/StackSafetyAnalysis/ipa-alias.ll +++ b/llvm/test/Analysis/StackSafetyAnalysis/ipa-alias.ll @@ -37,10 +37,6 @@ ; 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" diff --git a/llvm/test/Analysis/StackSafetyAnalysis/ipa.ll b/llvm/test/Analysis/StackSafetyAnalysis/ipa.ll --- a/llvm/test/Analysis/StackSafetyAnalysis/ipa.ll +++ b/llvm/test/Analysis/StackSafetyAnalysis/ipa.ll @@ -90,13 +90,6 @@ ; 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" diff --git a/llvm/test/Feature/load_extension.ll b/llvm/test/Feature/load_extension.ll --- a/llvm/test/Feature/load_extension.ll +++ b/llvm/test/Feature/load_extension.ll @@ -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 diff --git a/llvm/test/LTO/Resolution/X86/load-sample-prof-icp.ll b/llvm/test/LTO/Resolution/X86/load-sample-prof-icp.ll --- a/llvm/test/LTO/Resolution/X86/load-sample-prof-icp.ll +++ b/llvm/test/LTO/Resolution/X86/load-sample-prof-icp.ll @@ -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" diff --git a/llvm/test/LTO/Resolution/X86/load-sample-prof-lto.ll b/llvm/test/LTO/Resolution/X86/load-sample-prof-lto.ll --- a/llvm/test/LTO/Resolution/X86/load-sample-prof-lto.ll +++ b/llvm/test/LTO/Resolution/X86/load-sample-prof-lto.ll @@ -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 diff --git a/llvm/test/LTO/X86/diagnostic-handler-remarks.ll b/llvm/test/LTO/X86/diagnostic-handler-remarks.ll --- a/llvm/test/LTO/X86/diagnostic-handler-remarks.ll +++ b/llvm/test/LTO/X86/diagnostic-handler-remarks.ll @@ -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 | \ @@ -19,13 +17,13 @@ ; 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 | \ diff --git a/llvm/test/LTO/X86/disable-verify.ll b/llvm/test/LTO/X86/disable-verify.ll --- a/llvm/test/LTO/X86/disable-verify.ll +++ b/llvm/test/LTO/X86/disable-verify.ll @@ -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: diff --git a/llvm/test/LTO/X86/tailcallelim.ll b/llvm/test/LTO/X86/tailcallelim.ll --- a/llvm/test/LTO/X86/tailcallelim.ll +++ b/llvm/test/LTO/X86/tailcallelim.ll @@ -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" diff --git a/llvm/test/LTO/X86/tli-nobuiltin.ll b/llvm/test/LTO/X86/tli-nobuiltin.ll --- a/llvm/test/LTO/X86/tli-nobuiltin.ll +++ b/llvm/test/LTO/X86/tli-nobuiltin.ll @@ -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 @@ -19,20 +19,12 @@ ; 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' -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' -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' -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' -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 diff --git a/llvm/test/Other/X86/lto-hot-cold-split.ll b/llvm/test/Other/X86/lto-hot-cold-split.ll --- a/llvm/test/Other/X86/lto-hot-cold-split.ll +++ b/llvm/test/Other/X86/lto-hot-cold-split.ll @@ -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 diff --git a/llvm/test/ThinLTO/X86/cfi-devirt.ll b/llvm/test/ThinLTO/X86/cfi-devirt.ll --- a/llvm/test/ThinLTO/X86/cfi-devirt.ll +++ b/llvm/test/ThinLTO/X86/cfi-devirt.ll @@ -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 \ @@ -22,24 +21,6 @@ ; 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 diff --git a/llvm/test/ThinLTO/X86/cfi-unsat.ll b/llvm/test/ThinLTO/X86/cfi-unsat.ll --- a/llvm/test/ThinLTO/X86/cfi-unsat.ll +++ b/llvm/test/ThinLTO/X86/cfi-unsat.ll @@ -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 \ diff --git a/llvm/test/ThinLTO/X86/cfi.ll b/llvm/test/ThinLTO/X86/cfi.ll --- a/llvm/test/ThinLTO/X86/cfi.ll +++ b/llvm/test/ThinLTO/X86/cfi.ll @@ -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 \ @@ -13,15 +12,6 @@ ; 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" diff --git a/llvm/test/ThinLTO/X86/devirt-after-icp.ll b/llvm/test/ThinLTO/X86/devirt-after-icp.ll --- a/llvm/test/ThinLTO/X86/devirt-after-icp.ll +++ b/llvm/test/ThinLTO/X86/devirt-after-icp.ll @@ -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 \ @@ -63,25 +62,6 @@ ; 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 diff --git a/llvm/test/ThinLTO/X86/devirt.ll b/llvm/test/ThinLTO/X86/devirt.ll --- a/llvm/test/ThinLTO/X86/devirt.ll +++ b/llvm/test/ThinLTO/X86/devirt.ll @@ -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 \ @@ -62,21 +62,6 @@ ; 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 \ @@ -99,29 +84,6 @@ ; 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 diff --git a/llvm/test/ThinLTO/X86/devirt2.ll b/llvm/test/ThinLTO/X86/devirt2.ll --- a/llvm/test/ThinLTO/X86/devirt2.ll +++ b/llvm/test/ThinLTO/X86/devirt2.ll @@ -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 \ @@ -60,30 +60,6 @@ ; 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 \ @@ -118,44 +94,8 @@ ; 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 \ diff --git a/llvm/test/ThinLTO/X86/devirt_check.ll b/llvm/test/ThinLTO/X86/devirt_check.ll --- a/llvm/test/ThinLTO/X86/devirt_check.ll +++ b/llvm/test/ThinLTO/X86/devirt_check.ll @@ -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 \ diff --git a/llvm/test/ThinLTO/X86/devirt_external_comdat_same_guid.ll b/llvm/test/ThinLTO/X86/devirt_external_comdat_same_guid.ll --- a/llvm/test/ThinLTO/X86/devirt_external_comdat_same_guid.ll +++ b/llvm/test/ThinLTO/X86/devirt_external_comdat_same_guid.ll @@ -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 \ diff --git a/llvm/test/ThinLTO/X86/devirt_local_same_guid.ll b/llvm/test/ThinLTO/X86/devirt_local_same_guid.ll --- a/llvm/test/ThinLTO/X86/devirt_local_same_guid.ll +++ b/llvm/test/ThinLTO/X86/devirt_local_same_guid.ll @@ -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 \ diff --git a/llvm/test/ThinLTO/X86/devirt_promote.ll b/llvm/test/ThinLTO/X86/devirt_promote.ll --- a/llvm/test/ThinLTO/X86/devirt_promote.ll +++ b/llvm/test/ThinLTO/X86/devirt_promote.ll @@ -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 \ diff --git a/llvm/test/ThinLTO/X86/devirt_vcall_vis_hidden.ll b/llvm/test/ThinLTO/X86/devirt_vcall_vis_hidden.ll --- a/llvm/test/ThinLTO/X86/devirt_vcall_vis_hidden.ll +++ b/llvm/test/ThinLTO/X86/devirt_vcall_vis_hidden.ll @@ -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 \ diff --git a/llvm/test/ThinLTO/X86/devirt_vcall_vis_public.ll b/llvm/test/ThinLTO/X86/devirt_vcall_vis_public.ll --- a/llvm/test/ThinLTO/X86/devirt_vcall_vis_public.ll +++ b/llvm/test/ThinLTO/X86/devirt_vcall_vis_public.ll @@ -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 \ @@ -100,7 +100,7 @@ ; 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 \ @@ -115,7 +115,7 @@ ; 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 \ diff --git a/llvm/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll b/llvm/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll --- a/llvm/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll +++ b/llvm/test/ThinLTO/X86/diagnostic-handler-remarks-with-hotness.ll @@ -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: ... diff --git a/llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll b/llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll --- a/llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll +++ b/llvm/test/ThinLTO/X86/diagnostic-handler-remarks.ll @@ -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: ... diff --git a/llvm/test/ThinLTO/X86/newpm-basic.ll b/llvm/test/ThinLTO/X86/newpm-basic.ll --- a/llvm/test/ThinLTO/X86/newpm-basic.ll +++ b/llvm/test/ThinLTO/X86/newpm-basic.ll @@ -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" diff --git a/llvm/test/ThinLTO/X86/nodevirt-nonpromoted-typeid.ll b/llvm/test/ThinLTO/X86/nodevirt-nonpromoted-typeid.ll --- a/llvm/test/ThinLTO/X86/nodevirt-nonpromoted-typeid.ll +++ b/llvm/test/ThinLTO/X86/nodevirt-nonpromoted-typeid.ll @@ -16,20 +16,13 @@ ; 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" diff --git a/llvm/test/ThinLTO/X86/printer.ll b/llvm/test/ThinLTO/X86/printer.ll --- a/llvm/test/ThinLTO/X86/printer.ll +++ b/llvm/test/ThinLTO/X86/printer.ll @@ -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 diff --git a/llvm/test/tools/llvm-lto2/X86/pipeline.ll b/llvm/test/tools/llvm-lto2/X86/pipeline.ll --- a/llvm/test/tools/llvm-lto2/X86/pipeline.ll +++ b/llvm/test/tools/llvm-lto2/X86/pipeline.ll @@ -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" diff --git a/llvm/test/tools/llvm-lto2/X86/slp-vectorize-pm.ll b/llvm/test/tools/llvm-lto2/X86/slp-vectorize-pm.ll --- a/llvm/test/tools/llvm-lto2/X86/slp-vectorize-pm.ll +++ b/llvm/test/tools/llvm-lto2/X86/slp-vectorize-pm.ll @@ -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 diff --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp --- a/llvm/tools/llvm-lto/llvm-lto.cpp +++ b/llvm/tools/llvm-lto/llvm-lto.cpp @@ -256,11 +256,6 @@ cl::desc("Instead of running LTO, print the mach-o cpu in each IR file"), cl::cat(LTOCategory)); -static cl::opt - 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 DebugPassManager("debug-pass-manager", cl::init(false), cl::Hidden, cl::desc("Print pass management debugging information"), @@ -605,7 +600,6 @@ 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 @@ CodeGen.setCodePICModel(codegen::getExplicitRelocModel()); CodeGen.setFreestanding(EnableFreestanding); + CodeGen.setDebugPassManager(DebugPassManager); CodeGen.setDebugInfo(LTO_DEBUG_MODEL_DWARF); CodeGen.setTargetOptions(Options); @@ -1070,8 +1065,6 @@ CodeGen.setOptLevel(OptLevel - '0'); CodeGen.setAttrs(codegen::getMAttrs()); - CodeGen.setUseNewPM(UseNewPM); - if (auto FT = codegen::getExplicitFileType()) CodeGen.setFileType(FT.getValue()); diff --git a/llvm/tools/llvm-lto2/llvm-lto2.cpp b/llvm/tools/llvm-lto2/llvm-lto2.cpp --- a/llvm/tools/llvm-lto2/llvm-lto2.cpp +++ b/llvm/tools/llvm-lto2/llvm-lto2.cpp @@ -143,11 +143,6 @@ cl::desc("Run PGO context sensitive IR instrumentation"), cl::init(false), cl::Hidden); -static cl::opt - UseNewPM("use-new-pm", - cl::desc("Run LTO passes using the new pass manager"), - cl::init(true), cl::Hidden); - static cl::opt DebugPassManager("debug-pass-manager", cl::init(false), cl::Hidden, cl::desc("Print pass management debugging information")); @@ -267,7 +262,6 @@ Conf.AAPipeline = AAPipeline; Conf.OptLevel = OptLevel - '0'; - Conf.UseNewPM = UseNewPM; Conf.Freestanding = EnableFreestanding; for (auto &PluginFN : PassPlugins) Conf.PassPlugins.push_back(PluginFN);