From: Arthur Eubanks Date: Tue, 8 Dec 2020 22:27:39 +0000 (-0800) Subject: [ELF][LTO][NPM] Use NPM with ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER X-Git-Tag: llvmorg-13-init~3972 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa602d74f608f817a1e39af3163e5878b832e9df;p=platform%2Fupstream%2Fllvm.git [ELF][LTO][NPM] Use NPM with ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D92885 --- diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 87ca200..2350a0e3 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -47,6 +47,7 @@ #include "llvm/ADT/SetVector.h" #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringSwitch.h" +#include "llvm/Config/llvm-config.h" #include "llvm/LTO/LTO.h" #include "llvm/Remarks/HotnessThresholdParser.h" #include "llvm/Support/CommandLine.h" @@ -990,8 +991,9 @@ static void readConfigs(opt::InputArgList &args) { config->ltoCSProfileFile = args.getLastArgValue(OPT_lto_cs_profile_file); 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, false); + config->ltoNewPassManager = + args.hasFlag(OPT_lto_new_pass_manager, OPT_no_lto_new_pass_manager, + LLVM_ENABLE_NEW_PASS_MANAGER); config->ltoNewPmPasses = args.getLastArgValue(OPT_lto_newpm_passes); config->ltoWholeProgramVisibility = args.hasFlag(OPT_lto_whole_program_visibility,