aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/tools/opt/opt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/opt/opt.cpp')
-rw-r--r--contrib/llvm/tools/opt/opt.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/llvm/tools/opt/opt.cpp b/contrib/llvm/tools/opt/opt.cpp
index 9d489ab5a2d2..24cce58047f1 100644
--- a/contrib/llvm/tools/opt/opt.cpp
+++ b/contrib/llvm/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 != "") {