[PATCH] D155752: [wasm-ld] Switch to xxh3_64bits

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 10:47:56 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa3622ac80be1: [wasm-ld] Switch to xxh3_64bits (authored by MaskRay).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155752/new/

https://reviews.llvm.org/D155752

Files:
  lld/test/wasm/build-id.test
  lld/wasm/InputChunks.cpp
  lld/wasm/Writer.cpp


Index: lld/wasm/Writer.cpp
===================================================================
--- lld/wasm/Writer.cpp
+++ lld/wasm/Writer.cpp
@@ -290,7 +290,7 @@
   case BuildIdKind::Fast: {
     std::vector<uint8_t> fileHash(8);
     computeHash(fileHash, buf, [](uint8_t *dest, ArrayRef<uint8_t> arr) {
-      support::endian::write64le(dest, xxHash64(arr));
+      support::endian::write64le(dest, xxh3_64bits(arr));
     });
     makeUUID(5, fileHash, buildId);
     break;
Index: lld/wasm/InputChunks.cpp
===================================================================
--- lld/wasm/InputChunks.cpp
+++ lld/wasm/InputChunks.cpp
@@ -451,7 +451,7 @@
       fatal(toString(this) + ": string is not null terminated");
     size_t size = end + 1;
 
-    pieces.emplace_back(off, xxHash64(s.substr(0, size)), true);
+    pieces.emplace_back(off, xxh3_64bits(s.substr(0, size)), true);
     s = s.substr(size);
     off += size;
   }
Index: lld/test/wasm/build-id.test
===================================================================
--- lld/test/wasm/build-id.test
+++ lld/test/wasm/build-id.test
@@ -43,8 +43,8 @@
 
 
 # DEFAULT:      Contents of section build_id:
-# DEFAULT-NEXT: 0000 10cdbf99 f76b1f5e ebb2f36a 1bde1d6c  .....k.^...j...l
-# DEFAULT-NEXT: 0010 01
+# DEFAULT-NEXT: 0000 100e228e 4e2fa853 6393b43d ed1d4676
+# DEFAULT-NEXT: 0010 13 .
 
 # SHA1:      Contents of section build_id:
 # SHA1-NEXT: 0000 14ad22e8 54d72438 94af85de 3c5592bd  ..".T.$8....<U..


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155752.542588.patch
Type: text/x-patch
Size: 1477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230720/e28513df/attachment.bin>


More information about the llvm-commits mailing list