[PATCH] D28998: [lld/LTO] Add a flag to use the new PM during LTO
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 22 17:13:15 PST 2017
davide created this revision.
Depends on https://reviews.llvm.org/D28996 / https://reviews.llvm.org/D28997 , also needs a test.
Please hold on reviewing until the other two revisions go in.
Repository:
rL LLVM
https://reviews.llvm.org/D28998
Files:
ELF/Config.h
ELF/Driver.cpp
ELF/LTO.cpp
ELF/Options.td
Index: ELF/Options.td
===================================================================
--- ELF/Options.td
+++ ELF/Options.td
@@ -118,6 +118,9 @@
def l: JoinedOrSeparate<["-"], "l">, MetaVarName<"<libName>">,
HelpText<"Root name of library to use">;
+def lto_use_new_pm: F<"lto-use-new-pm">,
+ HelpText<"Run the new pass manager as part of LTO">;
+
def lto_O: J<"lto-O">, MetaVarName<"<opt-level>">,
HelpText<"Optimization level for LTO">;
Index: ELF/LTO.cpp
===================================================================
--- ELF/LTO.cpp
+++ ELF/LTO.cpp
@@ -76,6 +76,7 @@
Conf.DisableVerify = Config->DisableVerify;
Conf.DiagHandler = diagnosticHandler;
Conf.OptLevel = Config->LTOO;
+ Conf.OptUseNewPM = Config->LTOUseNewPM;
// Set up a custom pipeline if we've been asked to.
Conf.OptPipeline = Config->LTONewPmPasses;
Index: ELF/Driver.cpp
===================================================================
--- ELF/Driver.cpp
+++ ELF/Driver.cpp
@@ -491,6 +491,7 @@
Config->GcSections = getArg(Args, OPT_gc_sections, OPT_no_gc_sections, false);
Config->GdbIndex = Args.hasArg(OPT_gdb_index);
Config->ICF = Args.hasArg(OPT_icf);
+ Config->LTOUseNewPM = Args.hasArg(OPT_lto_use_new_pm);
Config->NoGnuUnique = Args.hasArg(OPT_no_gnu_unique);
Config->NoUndefinedVersion = Args.hasArg(OPT_no_undefined_version);
Config->Nostdlib = Args.hasArg(OPT_nostdlib);
Index: ELF/Config.h
===================================================================
--- ELF/Config.h
+++ ELF/Config.h
@@ -109,6 +109,7 @@
bool GdbIndex;
bool GnuHash = false;
bool ICF;
+ bool LTOUseNewPM;
bool Mips64EL = false;
bool MipsN32Abi = false;
bool NoGnuUnique;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28998.85309.patch
Type: text/x-patch
Size: 1707 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170123/63135611/attachment.bin>
More information about the llvm-commits
mailing list