forked from OSchip/llvm-project
[ELF] Rename --[no-]lto-new-pass-manager to --[no-]lto-legacy-pass-manager
Normally we should not delete options. However, the Clang driver passes `-plugin-opt={new,legacy}-pass-manager` instead of `--[no-]lto-legacy-pass-manager` (`-plugin-opt=new-pass-manager` has been used since 7.0), and it is unlikely anyone will use the `--lto-*` style options directly. So let's rename them to be consistent with the Clang driver option names. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D92988
This commit is contained in:
parent
cc15e75ce8
commit
7d38861ce3
|
@ -992,7 +992,7 @@ static void readConfigs(opt::InputArgList &args) {
|
|||
config->ltoDebugPassManager = args.hasArg(OPT_lto_debug_pass_manager);
|
||||
config->ltoEmitAsm = args.hasArg(OPT_lto_emit_asm);
|
||||
config->ltoNewPassManager =
|
||||
args.hasFlag(OPT_lto_new_pass_manager, OPT_no_lto_new_pass_manager,
|
||||
args.hasFlag(OPT_no_lto_legacy_pass_manager, OPT_lto_legacy_pass_manager,
|
||||
LLVM_ENABLE_NEW_PASS_MANAGER);
|
||||
config->ltoNewPmPasses = args.getLastArgValue(OPT_lto_newpm_passes);
|
||||
config->ltoWholeProgramVisibility =
|
||||
|
|
|
@ -530,9 +530,9 @@ 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">;
|
||||
defm lto_new_pass_manager: BB<"lto-new-pass-manager",
|
||||
"Use new pass manager",
|
||||
"Use legacy pass manager">;
|
||||
defm lto_legacy_pass_manager: BB<"lto-legacy-pass-manager",
|
||||
"Use the legacy pass manager in LLVM",
|
||||
"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>">,
|
||||
|
@ -597,9 +597,9 @@ def: J<"plugin-opt=jobs=">, Alias<thinlto_jobs>, HelpText<"Alias for --thinlto-j
|
|||
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<lto_new_pass_manager>, HelpText<"Alias for --lto-new-pass-manager">;
|
||||
Alias<no_lto_legacy_pass_manager>, HelpText<"Alias for --no-lto-legacy-pass-manager">;
|
||||
def: F<"plugin-opt=legacy-pass-manager">,
|
||||
Alias<no_lto_new_pass_manager>, HelpText<"Alias for --no-lto-new-pass-manager">;
|
||||
Alias<lto_legacy_pass_manager>, HelpText<"Alias for --no-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=">,
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
; 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 --lto-new-pass-manager --plugin-opt=debug-pass-manager -o /dev/null %t.o 2>&1 | FileCheck %s
|
||||
; RUN: ld.lld --lto-new-pass-manager --lto-debug-pass-manager -o /dev/null %t.o 2>&1 | FileCheck %s
|
||||
; RUN: ld.lld --lto-new-pass-manager --no-lto-new-pass-manager --lto-debug-pass-manager -o /dev/null %t.o 2>&1 | FileCheck %s --check-prefix=LEGACY
|
||||
; 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
|
||||
; RUN: ld.lld --no-lto-legacy-pass-manager --lto-legacy-pass-manager --lto-debug-pass-manager -o /dev/null %t.o 2>&1 | FileCheck %s --check-prefix=LEGACY
|
||||
; RUN: ld.lld --plugin-opt=legacy-pass-manager --plugin-opt=debug-pass-manager -o /dev/null %t.o 2>&1 | FileCheck %s --check-prefix=LEGACY
|
||||
|
||||
; CHECK: Starting llvm::Module pass manager run
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
; REQUIRES: x86
|
||||
; RUN: llvm-as %s -o %t.o
|
||||
; RUN: ld.lld %t.o -o %t2 -mllvm -debug-pass=Arguments --no-lto-new-pass-manager \
|
||||
; RUN: ld.lld %t.o -o %t2 -mllvm -debug-pass=Arguments --lto-legacy-pass-manager \
|
||||
; RUN: 2>&1 | FileCheck -check-prefix=DEFAULT-LPM %s
|
||||
; RUN: ld.lld %t.o -o %t2 -mllvm -debug-pass=Arguments --no-lto-new-pass-manager \
|
||||
; RUN: ld.lld %t.o -o %t2 -mllvm -debug-pass=Arguments --lto-legacy-pass-manager \
|
||||
; RUN: -disable-verify 2>&1 | FileCheck -check-prefix=DISABLE-LPM %s
|
||||
; RUN: ld.lld %t.o -o %t2 -mllvm -debug-pass=Arguments --no-lto-new-pass-manager \
|
||||
; RUN: ld.lld %t.o -o %t2 -mllvm -debug-pass=Arguments --lto-legacy-pass-manager \
|
||||
; RUN: --plugin-opt=disable-verify 2>&1 | FileCheck -check-prefix=DISABLE-LPM %s
|
||||
; RUN: ld.lld %t.o -o %t2 --lto-new-pass-manager --lto-debug-pass-manager \
|
||||
; RUN: ld.lld %t.o -o %t2 --no-lto-legacy-pass-manager --lto-debug-pass-manager \
|
||||
; RUN: 2>&1 | FileCheck -check-prefix=DEFAULT-NPM %s
|
||||
; RUN: ld.lld %t.o -o %t2 --lto-new-pass-manager --lto-debug-pass-manager \
|
||||
; RUN: ld.lld %t.o -o %t2 --no-lto-legacy-pass-manager --lto-debug-pass-manager \
|
||||
; RUN: -disable-verify 2>&1 | FileCheck -check-prefix=DISABLE-NPM %s
|
||||
; RUN: ld.lld %t.o -o %t2 --lto-new-pass-manager --lto-debug-pass-manager \
|
||||
; RUN: ld.lld %t.o -o %t2 --no-lto-legacy-pass-manager --lto-debug-pass-manager \
|
||||
; RUN: --plugin-opt=disable-verify 2>&1 | FileCheck -check-prefix=DISABLE-NPM %s
|
||||
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
|
Loading…
Reference in New Issue