[llvm-branch-commits] [llvm] [BOLT] Drop high discrepancy profiles in matching (PR #95156)
shaw young via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jun 11 14:32:47 PDT 2024
https://github.com/shawbyoung updated https://github.com/llvm/llvm-project/pull/95156
>From aa441dc0163d3d0f63de1e4dd1fa359180f82f1f Mon Sep 17 00:00:00 2001
From: shawbyoung <shawbyoung at gmail.com>
Date: Tue, 11 Jun 2024 11:43:13 -0700
Subject: [PATCH 1/2] Summary: Functions with little exact matching
Created using spr 1.3.4
---
bolt/docs/CommandLineArgumentReference.md | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/bolt/docs/CommandLineArgumentReference.md b/bolt/docs/CommandLineArgumentReference.md
index 8887d1f5d5bd4..bdc1d9dfd735c 100644
--- a/bolt/docs/CommandLineArgumentReference.md
+++ b/bolt/docs/CommandLineArgumentReference.md
@@ -614,6 +614,17 @@
- `--lite-threshold-pct=<uint>`
+ Threshold (in percent) of matched profile at which stale profile inference is
+ applied to functions. Argument corresponds to the sum of matched execution
+ counts of function blocks divided by the sum of execution counts of function
+ blocks. E.g if the sum of a function blocks' execution counts is 100, the sum
+ of the function blocks' matched execution counts is 10, and the argument is 15
+ (15%), profile inference will not be applied to that function. A higher
+ threshold will correlate with fewer functions to process in cases of stale
+ profile. Default set to %5.
+
+- `--matched-profile-threshold=<uint>`
+
Threshold (in percent) for selecting functions to process in lite mode. Higher
threshold means fewer functions to process. E.g threshold of 90 means only top
10 percent of functions with profile will be processed.
@@ -1161,4 +1172,4 @@
- `--print-options`
- Print non-default options after command line parsing
\ No newline at end of file
+ Print non-default options after command line parsing
>From 46fa37a054a129ca36e7b6ae126273e40fddea98 Mon Sep 17 00:00:00 2001
From: shaw young <58664393+shawbyoung at users.noreply.github.com>
Date: Tue, 11 Jun 2024 14:32:40 -0700
Subject: [PATCH 2/2] Update SampleProfileInference.h
---
llvm/include/llvm/Transforms/Utils/SampleProfileInference.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/llvm/include/llvm/Transforms/Utils/SampleProfileInference.h b/llvm/include/llvm/Transforms/Utils/SampleProfileInference.h
index c654715c0ae9f..9ccbd0fa88f3d 100644
--- a/llvm/include/llvm/Transforms/Utils/SampleProfileInference.h
+++ b/llvm/include/llvm/Transforms/Utils/SampleProfileInference.h
@@ -58,6 +58,7 @@ struct FlowFunction {
std::vector<FlowJump> Jumps;
/// The index of the entry block.
uint64_t Entry{0};
+ uint64_t Sink{UINT64_MAX};
// Matched execution count for the function.
uint64_t MatchedExecCount{0};
};
More information about the llvm-branch-commits
mailing list