[llvm-branch-commits] [lld] fed7565 - [COFF][LTO][NPM] Use NPM for LTO with ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER

Arthur Eubanks via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Dec 9 09:02:48 PST 2020


Author: Arthur Eubanks
Date: 2020-12-09T08:53:50-08:00
New Revision: fed7565ee2172fbb77c22b2362c76ffc1fdf39d7

URL: https://github.com/llvm/llvm-project/commit/fed7565ee2172fbb77c22b2362c76ffc1fdf39d7
DIFF: https://github.com/llvm/llvm-project/commit/fed7565ee2172fbb77c22b2362c76ffc1fdf39d7.diff

LOG: [COFF][LTO][NPM] Use NPM for LTO with ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER

Reviewed By: hans

Differential Revision: https://reviews.llvm.org/D92866

Added: 
    

Modified: 
    lld/COFF/Driver.cpp

Removed: 
    


################################################################################
diff  --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index 35b253ded3ec..504c00584d9c 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -26,6 +26,7 @@
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/BinaryFormat/Magic.h"
+#include "llvm/Config/llvm-config.h"
 #include "llvm/LTO/LTO.h"
 #include "llvm/Object/ArchiveWriter.h"
 #include "llvm/Object/COFFImportFile.h"
@@ -1518,7 +1519,7 @@ void LinkerDriver::link(ArrayRef<const char *> argsArr) {
   unsigned icfLevel =
       args.hasArg(OPT_profile) ? 0 : 1; // 0: off, 1: limited, 2: on
   unsigned tailMerge = 1;
-  bool ltoNewPM = false;
+  bool ltoNewPM = LLVM_ENABLE_NEW_PASS_MANAGER;
   bool ltoDebugPM = false;
   for (auto *arg : args.filtered(OPT_opt)) {
     std::string str = StringRef(arg->getValue()).lower();


        


More information about the llvm-branch-commits mailing list