diff --git a/llvm/test/tools/gold/X86/disable-verify.ll b/llvm/test/tools/gold/X86/disable-verify.ll --- a/llvm/test/tools/gold/X86/disable-verify.ll +++ b/llvm/test/tools/gold/X86/disable-verify.ll @@ -2,12 +2,11 @@ ; REQUIRES: asserts ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \ -; RUN: --plugin-opt=disable-verify --plugin-opt=legacy-pass-manager \ -; RUN: --plugin-opt=-debug-pass=Arguments \ +; RUN: --plugin-opt=disable-verify --plugin-opt=debug-pass-manager \ ; RUN: -shared %t.o -o %t2.o 2>&1 | FileCheck %s ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \ -; RUN: --plugin-opt=-debug-pass=Arguments --plugin-opt=legacy-pass-manager \ +; RUN: --plugin-opt=debug-pass-manager \ ; RUN: -shared %t.o -o %t2.o 2>&1 | FileCheck %s -check-prefix=VERIFY target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" @@ -15,10 +14,10 @@ ; -disable-verify should disable output verification from the optimization ; pipeline. -; CHECK: Pass Arguments: {{.*}} -verify - -; CHECK-NOT: -verify +; CHECK-NOT: VerifierPass -; VERIFY: Pass Arguments: {{.*}} -verify {{.*}} -verify +; VERIFY: Running pass: VerifierPass on [module] +; VERIFY: Running pass: VerifierPass on [module] define void @f() { entry: diff --git a/llvm/test/tools/gold/X86/new-pm.ll b/llvm/test/tools/gold/X86/new-pm.ll --- a/llvm/test/tools/gold/X86/new-pm.ll +++ b/llvm/test/tools/gold/X86/new-pm.ll @@ -10,12 +10,6 @@ ; CHECK: Running pass: -;; --plugin-opt=debug-pass-manager is a no-op for the legacy pass manager. -; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \ -; RUN: --plugin-opt=thinlto \ -; RUN: --plugin-opt=legacy-pass-manager --plugin-opt=debug-pass-manager \ -; RUN: -o /dev/null %t.o 2>&1 | count 0 - target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/tools/gold/X86/opt-level.ll b/llvm/test/tools/gold/X86/opt-level.ll --- a/llvm/test/tools/gold/X86/opt-level.ll +++ b/llvm/test/tools/gold/X86/opt-level.ll @@ -1,17 +1,4 @@ ; RUN: llvm-as -o %t.bc %s -; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext -plugin-opt=save-temps \ -; RUN: -m elf_x86_64 \ -; RUN: -plugin-opt=O0 -r -o %t.o %t.bc -; RUN: llvm-dis < %t.o.0.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O0 %s -; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext -plugin-opt=save-temps \ -; RUN: -m elf_x86_64 --plugin-opt=legacy-pass-manager \ -; RUN: -plugin-opt=O1 -r -o %t.o %t.bc -; RUN: llvm-dis < %t.o.0.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O1 --check-prefix=CHECK-O1-OLDPM %s -; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext -plugin-opt=save-temps \ -; RUN: -m elf_x86_64 \ -; RUN: -plugin-opt=O2 -r -o %t.o %t.bc -; RUN: llvm-dis < %t.o.0.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O2 %s - ; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext -plugin-opt=save-temps \ ; RUN: -m elf_x86_64 --plugin-opt=new-pass-manager \ ; RUN: -plugin-opt=O0 -r -o %t.o %t.bc @@ -19,7 +6,7 @@ ; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext -plugin-opt=save-temps \ ; RUN: -m elf_x86_64 --plugin-opt=new-pass-manager \ ; RUN: -plugin-opt=O1 -r -o %t.o %t.bc -; RUN: llvm-dis < %t.o.0.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O1 --check-prefix=CHECK-O1-NEWPM %s +; RUN: llvm-dis < %t.o.0.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O1 %s ; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext -plugin-opt=save-temps \ ; RUN: -m elf_x86_64 --plugin-opt=new-pass-manager \ ; RUN: -plugin-opt=O2 -r -o %t.o %t.bc @@ -49,9 +36,7 @@ end: ; CHECK-O0: phi - ; CHECK-O1-OLDPM: select - ; The new PM does not do as many optimizations at O1 - ; CHECK-O1-NEWPM: phi + ; CHECK-O1: phi %r = phi i32 [ 1, %t ], [ 2, %f ] ret i32 %r } diff --git a/llvm/test/tools/gold/X86/opt-remarks.ll b/llvm/test/tools/gold/X86/opt-remarks.ll --- a/llvm/test/tools/gold/X86/opt-remarks.ll +++ b/llvm/test/tools/gold/X86/opt-remarks.ll @@ -1,7 +1,7 @@ ; Test plugin options for opt-remarks. ; RUN: llvm-as %s -o %t.o ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext -shared \ -; RUN: -plugin-opt=save-temps -plugin-opt=legacy-pass-manager \ +; RUN: -plugin-opt=save-temps \ ; RUN: -plugin-opt=opt-remarks-passes=inline \ ; RUN: -plugin-opt=opt-remarks-format=yaml \ ; RUN: -plugin-opt=opt-remarks-filename=%t.yaml %t.o -o %t2.o 2>&1 @@ -44,6 +44,16 @@ ; YAML-NEXT: - Caller: f ; YAML-NEXT: - String: ' because its definition is unavailable' ; YAML-NEXT: ... +; YAML-NEXT: --- !Missed +; YAML-NEXT: Pass: inline +; YAML-NEXT: Name: NoDefinition +; YAML-NEXT: Function: f +; YAML-NEXT: Args: +; YAML-NEXT: - Callee: bar +; YAML-NEXT: - String: ' will not be inlined into ' +; YAML-NEXT: - Caller: f +; YAML-NEXT: - String: ' because its definition is unavailable' +; YAML-NEXT: ... ; YAML-NEXT: --- !Passed ; YAML-NEXT: Pass: inline ; YAML-NEXT: Name: Inlined diff --git a/llvm/test/tools/gold/X86/slp-vectorize.ll b/llvm/test/tools/gold/X86/slp-vectorize.ll --- a/llvm/test/tools/gold/X86/slp-vectorize.ll +++ b/llvm/test/tools/gold/X86/slp-vectorize.ll @@ -1,8 +1,7 @@ ; RUN: llvm-as %s -o %t.o ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \ -; RUN: --plugin-opt=save-temps --plugin-opt=legacy-pass-manager \ -; RUN: -shared %t.o -o %t2.o +; RUN: --plugin-opt=save-temps -shared %t.o -o %t2.o ; RUN: llvm-dis %t2.o.0.4.opt.bc -o - | FileCheck %s ; test that the vectorizer is run. diff --git a/llvm/test/tools/gold/X86/vectorize.ll b/llvm/test/tools/gold/X86/vectorize.ll --- a/llvm/test/tools/gold/X86/vectorize.ll +++ b/llvm/test/tools/gold/X86/vectorize.ll @@ -1,8 +1,7 @@ ; RUN: llvm-as %s -o %t.o ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \ -; RUN: --plugin-opt=save-temps --plugin-opt=legacy-pass-manager \ -; RUN: -shared %t.o -o %t2.o +; RUN: --plugin-opt=save-temps -shared %t.o -o %t2.o ; RUN: llvm-dis %t2.o.0.4.opt.bc -o - | FileCheck %s ; test that the vectorizer is run. diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -200,8 +200,6 @@ static std::vector extra; // Sample profile file path static std::string sample_profile; - // New pass manager - static bool new_pass_manager = true; // Debug new pass manager static bool debug_pass_manager = false; // Directory to store the .dwo files. @@ -287,9 +285,7 @@ } else if (opt.consume_front("cs-profile-path=")) { cs_profile_path = std::string(opt); } else if (opt == "new-pass-manager") { - new_pass_manager = true; - } else if (opt == "legacy-pass-manager") { - new_pass_manager = false; + // We always use the new pass manager. } else if (opt == "debug-pass-manager") { debug_pass_manager = true; } else if (opt == "whole-program-visibility") { @@ -956,8 +952,6 @@ Conf.RemarksHotnessThreshold = options::RemarksHotnessThreshold; Conf.RemarksFormat = options::RemarksFormat; - // Use new pass manager if set in driver - Conf.UseNewPM = options::new_pass_manager; // Debug new pass manager if requested Conf.DebugPassManager = options::debug_pass_manager;