[llvm] 30e753d - [FSAFDO] Switch to xxh3_64bits

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 14:23:32 PDT 2023


Author: Fangrui Song
Date: 2023-07-19T14:23:28-07:00
New Revision: 30e753dd07d9c66f6860e8ffcfbbda41155af975

URL: https://github.com/llvm/llvm-project/commit/30e753dd07d9c66f6860e8ffcfbbda41155af975
DIFF: https://github.com/llvm/llvm-project/commit/30e753dd07d9c66f6860e8ffcfbbda41155af975.diff

LOG: [FSAFDO] Switch to xxh3_64bits

Following recent changes switching from xxh64 to xxh32 for better
hashing performance. This particular instance may or may not have
noticeable performance difference, but this change makes us toward
removing xxHash64.

Added: 
    

Modified: 
    llvm/lib/CodeGen/MIRFSDiscriminator.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/MIRFSDiscriminator.cpp b/llvm/lib/CodeGen/MIRFSDiscriminator.cpp
index bdafe216e8f11d..8d17cceeb3cde8 100644
--- a/llvm/lib/CodeGen/MIRFSDiscriminator.cpp
+++ b/llvm/lib/CodeGen/MIRFSDiscriminator.cpp
@@ -80,8 +80,8 @@ static uint64_t getCallStackHash(const DILocation *DIL) {
   };
   uint64_t Ret = 0;
   for (DIL = DIL->getInlinedAt(); DIL; DIL = DIL->getInlinedAt()) {
-    Ret = hashCombine(Ret, xxHash64(ArrayRef<uint8_t>(DIL->getLine())));
-    Ret = hashCombine(Ret, xxHash64(DIL->getSubprogramLinkageName()));
+    Ret = hashCombine(Ret, xxh3_64bits(ArrayRef<uint8_t>(DIL->getLine())));
+    Ret = hashCombine(Ret, xxh3_64bits(DIL->getSubprogramLinkageName()));
   }
   return Ret;
 }


        


More information about the llvm-commits mailing list