diff options
author | Teresa Johnson <tejohnson@google.com> | 2018-04-05 03:16:57 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2018-04-05 03:16:57 +0000 |
commit | 70565e4cacfec74b75b4ef893e391c5ae95f5bf4 (patch) | |
tree | 0d8b894884b09ad2df22e7e4c4e41419a481c6f7 /llvm/tools/gold/gold-plugin.cpp | |
parent | f41aa4fd85271af9c16322289d217db786945649 (diff) | |
download | bcm5719-llvm-70565e4cacfec74b75b4ef893e391c5ae95f5bf4.tar.gz bcm5719-llvm-70565e4cacfec74b75b4ef893e391c5ae95f5bf4.zip |
[gold] Add debug-pass-manager option, and use it to test new-pass-manager
Summary: Follow up from r314963.
Reviewers: pcc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45293
llvm-svn: 329249
Diffstat (limited to 'llvm/tools/gold/gold-plugin.cpp')
-rw-r--r-- | llvm/tools/gold/gold-plugin.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index ebd6260d9b7..d2d0e77d719 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -197,6 +197,8 @@ namespace options { static std::string sample_profile; // New pass manager static bool new_pass_manager = false; + // Debug new pass manager + static bool debug_pass_manager = false; static void process_plugin_option(const char *opt_) { @@ -258,6 +260,8 @@ namespace options { sample_profile= opt.substr(strlen("sample-profile=")); } else if (opt == "new-pass-manager") { new_pass_manager = true; + } else if (opt == "debug-pass-manager") { + debug_pass_manager = true; } else { // Save this option to pass to the code generator. // ParseCommandLineOptions() expects argv[0] to be program name. Lazily @@ -853,6 +857,8 @@ static std::unique_ptr<LTO> createLTO(IndexWriteCallback OnIndexWrite, // Use new pass manager if set in driver Conf.UseNewPM = options::new_pass_manager; + // Debug new pass manager if requested + Conf.DebugPassManager = options::debug_pass_manager; return llvm::make_unique<LTO>(std::move(Conf), Backend, options::ParallelCodeGenParallelismLevel); |