summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/LTOCodeGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/LTO/LTOCodeGenerator.cpp')
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index ffe9af74cdc..939d12a20be 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -89,6 +89,12 @@ cl::opt<bool> LTOPassRemarksWithHotness(
"lto-pass-remarks-with-hotness",
cl::desc("With PGO, include profile count in optimization remarks"),
cl::Hidden);
+
+cl::opt<unsigned> LTOPassRemarksHotnessThreshold(
+ "lto-pass-remarks-hotness-threshold",
+ cl::desc("Minimum profile count required for an optimization remark to be "
+ "output"),
+ cl::Hidden);
}
LTOCodeGenerator::LTOCodeGenerator(LLVMContext &Context)
@@ -505,7 +511,8 @@ bool LTOCodeGenerator::optimize(bool DisableVerify, bool DisableInline,
return false;
auto DiagFileOrErr = lto::setupOptimizationRemarks(
- Context, LTORemarksFilename, LTOPassRemarksWithHotness);
+ Context, LTORemarksFilename, LTOPassRemarksWithHotness,
+ LTOPassRemarksHotnessThreshold);
if (!DiagFileOrErr) {
errs() << "Error: " << toString(DiagFileOrErr.takeError()) << "\n";
report_fatal_error("Can't get an output file for the remarks");
OpenPOWER on IntegriCloud