Skip to content

[BOLT] Call hash_combine_range with ranges (NFC) #136524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

kazutakahirata
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Apr 21, 2025

@llvm/pr-subscribers-bolt

Author: Kazu Hirata (kazutakahirata)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/136524.diff

1 Files Affected:

  • (modified) bolt/lib/Profile/YAMLProfileWriter.cpp (+3-6)
diff --git a/bolt/lib/Profile/YAMLProfileWriter.cpp b/bolt/lib/Profile/YAMLProfileWriter.cpp
index e394858163560..2bdc7b65b4804 100644
--- a/bolt/lib/Profile/YAMLProfileWriter.cpp
+++ b/bolt/lib/Profile/YAMLProfileWriter.cpp
@@ -133,12 +133,9 @@ std::vector<yaml::bolt::PseudoProbeInfo>
 YAMLProfileWriter::convertNodeProbes(NodeIdToProbes &NodeProbes) {
   struct BlockProbeInfoHasher {
     size_t operator()(const yaml::bolt::PseudoProbeInfo &BPI) const {
-      auto HashCombine = [](auto &Range) {
-        return llvm::hash_combine_range(Range.begin(), Range.end());
-      };
-      return llvm::hash_combine(HashCombine(BPI.BlockProbes),
-                                HashCombine(BPI.CallProbes),
-                                HashCombine(BPI.IndCallProbes));
+      return llvm::hash_combine(llvm::hash_combine_range(BPI.BlockProbes),
+                                llvm::hash_combine_range(BPI.CallProbes),
+                                llvm::hash_combine_range(BPI.IndCallProbes));
     }
   };
 

@kazutakahirata kazutakahirata merged commit a8644b3 into llvm:main Apr 21, 2025
12 checks passed
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants