[WebAssembly] Rename --lto-no-new-pass-manager to --no-lto-new-pass-manager

In addition, disallow `-lto-new-pass-manager` (see D79371).

Note: the ELF port has also adopted --no-lto-new-pass-manager

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D92422
This commit is contained in:
Fangrui Song 2020-12-01 16:52:37 -08:00
parent c82f002cea
commit 31e03a9bd9
3 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,6 @@
; RUN: llvm-as -o %t.bc %s
; RUN: wasm-ld --lto-new-pass-manager --lto-debug-pass-manager -o /dev/null %t.bc 2>&1 | FileCheck %s
; RUN: wasm-ld --lto-new-pass-manager --lto-debug-pass-manager --lto-no-new-pass-manager -o /dev/null %t.bc 2>&1 | FileCheck %s --allow-empty --check-prefix=LPM
; RUN: wasm-ld --lto-new-pass-manager --lto-debug-pass-manager --no-lto-new-pass-manager -o /dev/null %t.bc 2>&1 | FileCheck %s --allow-empty --check-prefix=LPM
; CHECK: Starting llvm::Module pass manager run
; CHECK: Finished llvm::Module pass manager run

View File

@ -380,7 +380,7 @@ static void readConfigs(opt::InputArgList &args) {
config->ltoo = args::getInteger(args, OPT_lto_O, 2);
config->ltoPartitions = args::getInteger(args, OPT_lto_partitions, 1);
config->ltoNewPassManager = args.hasFlag(OPT_lto_new_pass_manager,
OPT_lto_no_new_pass_manager, false);
OPT_no_lto_new_pass_manager, false);
config->ltoDebugPassManager = args.hasArg(OPT_lto_debug_pass_manager);
config->mapFile = args.getLastArgValue(OPT_Map);
config->optimize = args::getInteger(args, OPT_O, 0);

View File

@ -17,6 +17,11 @@ multiclass B<string name, string help1, string help2> {
def no_ # NAME: Flag<["--", "-"], "no-" # name>, HelpText<help2>;
}
multiclass BB<string name, string help1, string help2> {
def NAME: Flag<["--"], name>, HelpText<help1>;
def no_ # NAME: Flag<["--"], "no-" # name>, HelpText<help2>;
}
// The following flags are shared with the ELF linker
def Bsymbolic: F<"Bsymbolic">, HelpText<"Bind defined symbols locally">;
@ -215,10 +220,7 @@ def thinlto_cache_dir: J<"thinlto-cache-dir=">,
defm thinlto_cache_policy: Eq<"thinlto-cache-policy", "Pruning policy for the ThinLTO cache">;
def thinlto_jobs: J<"thinlto-jobs=">,
HelpText<"Number of ThinLTO jobs. Default to --threads=">;
def lto_new_pass_manager: F<"lto-new-pass-manager">,
HelpText<"Use new pass manager">;
def lto_no_new_pass_manager: F<"lto-no-new-pass-manager">,
HelpText<"Use legacy pass manager">;
defm lto_new_pass_manager: BB<"lto-new-pass-manager", "Use new pass manager", "Use legacy pass manager">;
def lto_debug_pass_manager: F<"lto-debug-pass-manager">,
HelpText<"Debug new pass manager">;