diff options
| author | Tim Shen <timshen91@gmail.com> | 2017-06-01 23:13:44 +0000 |
|---|---|---|
| committer | Tim Shen <timshen91@gmail.com> | 2017-06-01 23:13:44 +0000 |
| commit | 4e912aa5af44b3f3024cfcb4a3bfb932c49fc225 (patch) | |
| tree | 3e44bb19b341237548315ba0a7f55bf2ea667a9b /llvm/lib/LTO | |
| parent | c3688315805825576527f238f8dd9a6def90a4ee (diff) | |
| download | bcm5719-llvm-4e912aa5af44b3f3024cfcb4a3bfb932c49fc225.tar.gz bcm5719-llvm-4e912aa5af44b3f3024cfcb4a3bfb932c49fc225.zip | |
[ThinLTO] Move -lto-use-new-pm to llvm-lto2, and change it to -use-new-pm.
Summary:
As we teach Clang to use ThinkLTO + new PM, it's good for the users to
inject through Config, instead of setting a flag in the LTOBackend
library. Move the flag to llvm-lto2.
As it moves to llvm-lto2, a new name -use-new-pm seems simpler and as
clear.
Reviewers: davide, tejohnson
Subscribers: mehdi_amini, Prazek, inglorion, eraman, chandlerc, llvm-commits
Differential Revision: https://reviews.llvm.org/D33799
llvm-svn: 304492
Diffstat (limited to 'llvm/lib/LTO')
| -rw-r--r-- | llvm/lib/LTO/LTO.cpp | 1 | ||||
| -rw-r--r-- | llvm/lib/LTO/LTOBackend.cpp | 7 |
2 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index b8698c8a4f0..2bd3af6e92d 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -122,6 +122,7 @@ static void computeCacheKey( AddUnsigned(Conf.CGOptLevel); AddUnsigned(Conf.CGFileType); AddUnsigned(Conf.OptLevel); + AddUnsigned(Conf.UseNewPM); AddString(Conf.OptPipeline); AddString(Conf.AAPipeline); AddString(Conf.OverrideTriple); diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp index f9c41f5c974..3f72e446cdf 100644 --- a/llvm/lib/LTO/LTOBackend.cpp +++ b/llvm/lib/LTO/LTOBackend.cpp @@ -42,11 +42,6 @@ using namespace llvm; using namespace lto; -static cl::opt<bool> - LTOUseNewPM("lto-use-new-pm", - cl::desc("Run LTO passes using the new pass manager"), - cl::init(false), cl::Hidden); - LLVM_ATTRIBUTE_NORETURN static void reportOpenError(StringRef Path, Twine Msg) { errs() << "failed to open " << Path << ": " << Msg << '\n'; errs().flush(); @@ -266,7 +261,7 @@ bool opt(Config &Conf, TargetMachine *TM, unsigned Task, Module &Mod, if (!Conf.OptPipeline.empty()) runNewPMCustomPasses(Mod, TM, Conf.OptPipeline, Conf.AAPipeline, Conf.DisableVerify); - else if (LTOUseNewPM) + else if (Conf.UseNewPM) runNewPMPasses(Mod, TM, Conf.OptLevel, IsThinLTO); else runOldPMPasses(Conf, Mod, TM, IsThinLTO, ExportSummary, ImportSummary); |

