[llvm] [SPGO] Use std::hash instead of MD5 to avoid run time regression in llvm-profgen (PR #180581)

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 9 12:04:45 PST 2026


================
@@ -522,7 +522,9 @@ struct SampleContextFrame {
   }
 
   uint64_t getHashCode() const {
-    uint64_t NameHash = Func.getHashCode();
+    // Context frame hash is heavily used in llvm-profgen context-sensitive
+    // pre-inliner. Use a lightweight hashing here to avoid speed regression.
+    uint64_t NameHash = std::hash<std::string>{}(Func.str());
----------------
HighW4y2H3ll wrote:

ah, good catch.. updated! thx

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


More information about the llvm-commits mailing list