[llvm-branch-commits] [BOLT] Split up StaleProfileMatching::matchWeights (PR #165492)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Oct 28 16:21:00 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- bolt/lib/Profile/StaleProfileMatching.cpp
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/bolt/lib/Profile/StaleProfileMatching.cpp b/bolt/lib/Profile/StaleProfileMatching.cpp
index b93d8006b..7c750391c 100644
--- a/bolt/lib/Profile/StaleProfileMatching.cpp
+++ b/bolt/lib/Profile/StaleProfileMatching.cpp
@@ -749,13 +749,12 @@ size_t setBlockWeights(FlowFunction &Func, ArrayRef<uint64_t> OutWeight,
 /// of the basic blocks in the binary, the count is "matched" to the block.
 /// Similarly, if both the source and the target of a count in the profile are
 /// matched to a jump in the binary, the count is recorded in CFG.
-size_t matchWeights(BinaryContext &BC,
-                    const BinaryFunction::BasicBlockOrderType &BlockOrder,
-                    const yaml::bolt::BinaryFunctionProfile &YamlBF,
-                    FlowFunction &Func, HashFunction HashFunction,
-                    YAMLProfileReader::ProfileLookupMap &IdToYamlBF,
-                    const BinaryFunction &BF,
-                    const ArrayRef<YAMLProfileReader::ProbeMatchSpec> ProbeMatchSpecs) {
+size_t matchWeights(
+    BinaryContext &BC, const BinaryFunction::BasicBlockOrderType &BlockOrder,
+    const yaml::bolt::BinaryFunctionProfile &YamlBF, FlowFunction &Func,
+    HashFunction HashFunction, YAMLProfileReader::ProfileLookupMap &IdToYamlBF,
+    const BinaryFunction &BF,
+    const ArrayRef<YAMLProfileReader::ProbeMatchSpec> ProbeMatchSpecs) {
   using namespace yaml::bolt;
 
   assert(Func.Blocks.size() == BlockOrder.size() + 2);

``````````

</details>


https://github.com/llvm/llvm-project/pull/165492


More information about the llvm-branch-commits mailing list