diff options
Diffstat (limited to 'llvm/tools/gold/gold-plugin.cpp')
-rw-r--r-- | llvm/tools/gold/gold-plugin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index fbf78b02551..dc61ff925ce 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -205,8 +205,9 @@ namespace options { /// Statistics output filename. static std::string stats_file; - // Optimization remarks filename and hotness options + // Optimization remarks filename, accepted passes and hotness options static std::string OptRemarksFilename; + static std::string OptRemarksFilter; static bool OptRemarksWithHotness = false; // Context sensitive PGO options. @@ -285,6 +286,8 @@ namespace options { dwo_dir = opt.substr(strlen("dwo_dir=")); } else if (opt.startswith("opt-remarks-filename=")) { OptRemarksFilename = opt.substr(strlen("opt-remarks-filename=")); + } else if (opt.startswith("opt-remarks-passes=")) { + OptRemarksFilter = opt.substr(strlen("opt-remarks-passes=")); } else if (opt == "opt-remarks-with-hotness") { OptRemarksWithHotness = true; } else if (opt.startswith("stats-file=")) { @@ -908,6 +911,7 @@ static std::unique_ptr<LTO> createLTO(IndexWriteCallback OnIndexWrite, // Set up optimization remarks handling. Conf.RemarksFilename = options::OptRemarksFilename; + Conf.RemarksPasses = options::OptRemarksFilter; Conf.RemarksWithHotness = options::OptRemarksWithHotness; // Use new pass manager if set in driver |