diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-07-01 13:22:02 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-07-01 13:22:02 +0000 |
commit | 9df3605dea17e84f8183581f6103bd0c79e2a606 (patch) | |
tree | 70a2f36ce9eb9bb213603cd7f2f120af53fc176f /tools/opt/opt.cpp | |
parent | 08bbd35a80bf7765fe0d3043f9eb5a2f2786b649 (diff) |
Diffstat (limited to 'tools/opt/opt.cpp')
-rw-r--r-- | tools/opt/opt.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 9d489ab5a2d21..24cce58047f1a 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -242,6 +242,11 @@ static cl::opt<bool> PassRemarksWithHotness( cl::desc("With PGO, include profile count in optimization remarks"), cl::Hidden); +static cl::opt<unsigned> PassRemarksHotnessThreshold( + "pass-remarks-hotness-threshold", + cl::desc("Minimum profile count required for an optimization remark to be output"), + cl::Hidden); + static cl::opt<std::string> RemarksFilename("pass-remarks-output", cl::desc("YAML output filename for pass remarks"), @@ -420,7 +425,10 @@ int main(int argc, char **argv) { Context.enableDebugTypeODRUniquing(); if (PassRemarksWithHotness) - Context.setDiagnosticHotnessRequested(true); + Context.setDiagnosticsHotnessRequested(true); + + if (PassRemarksHotnessThreshold) + Context.setDiagnosticsHotnessThreshold(PassRemarksHotnessThreshold); std::unique_ptr<tool_output_file> YamlFile; if (RemarksFilename != "") { |