summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llc/llc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llc/llc.cpp')
-rw-r--r--llvm/tools/llc/llc.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index cd2481bcf46..f13a19213c6 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -149,6 +149,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"),
@@ -325,6 +330,9 @@ int main(int argc, char **argv) {
if (PassRemarksWithHotness)
Context.setDiagnosticsHotnessRequested(true);
+ if (PassRemarksHotnessThreshold)
+ Context.setDiagnosticsHotnessThreshold(PassRemarksHotnessThreshold);
+
std::unique_ptr<tool_output_file> YamlFile;
if (RemarksFilename != "") {
std::error_code EC;
OpenPOWER on IntegriCloud