[FSAFDO] Switch to xxh3_64bits
authorFangrui Song <i@maskray.me>
Wed, 19 Jul 2023 21:23:28 +0000 (14:23 -0700)
committerFangrui Song <i@maskray.me>
Wed, 19 Jul 2023 21:23:28 +0000 (14:23 -0700)
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.

llvm/lib/CodeGen/MIRFSDiscriminator.cpp

index bdafe21..8d17cce 100644 (file)
@@ -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;
 }