[PATCH] D154813: [ELF] Use llvm::xxh3_64bits for MergeInputSection::splitStrings
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 19 08:34:46 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4f608151148d: [ELF] Use llvm::xxh3_64bits for MergeInputSection::splitStrings (authored by MaskRay).
Changed prior to commit:
https://reviews.llvm.org/D154813?vs=538499&id=542045#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154813/new/
https://reviews.llvm.org/D154813
Files:
lld/ELF/InputSection.cpp
lld/test/ELF/comment-gc.s
lld/test/ELF/compress-debug-sections-zstd.s
lld/test/ELF/compressed-debug-input.s
lld/test/ELF/gc-sections-string.s
Index: lld/test/ELF/gc-sections-string.s
===================================================================
--- lld/test/ELF/gc-sections-string.s
+++ lld/test/ELF/gc-sections-string.s
@@ -15,7 +15,7 @@
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: s3
-// CHECK-NEXT: Value: 0x200120
+// CHECK-NEXT: Value: 0x200125
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local (0x0)
// CHECK-NEXT: Type: Object (0x1)
@@ -24,7 +24,7 @@
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: s1
-// CHECK-NEXT: Value: 0x200125
+// CHECK-NEXT: Value: 0x200120
// CHECK-NEXT: Size: 0
// CHECK-NEXT: Binding: Local (0x0)
// CHECK-NEXT: Type: Object (0x1)
Index: lld/test/ELF/compressed-debug-input.s
===================================================================
--- lld/test/ELF/compressed-debug-input.s
+++ lld/test/ELF/compressed-debug-input.s
@@ -43,10 +43,10 @@
# DATA-NEXT: AddressAlignment: 1
# DATA-NEXT: EntrySize: 1
# DATA-NEXT: SectionData (
-# DATA-NEXT: 0000: 756E7369 676E6564 20696E74 00636861 |unsigned int.cha|
-# DATA-NEXT: 0010: 7200756E 7369676E 65642063 68617200 |r.unsigned char.|
-# DATA-NEXT: 0020: 73686F72 7420756E 7369676E 65642069 |short unsigned i|
-# DATA-NEXT: 0030: 6E74006C 6F6E6720 756E7369 676E6564 |nt.long unsigned|
+# DATA-NEXT: 0000: 73686F72 7420756E 7369676E 65642069 |short unsigned i|
+# DATA-NEXT: 0010: 6E740075 6E736967 6E656420 63686172 |nt.unsigned char|
+# DATA-NEXT: 0020: 00636861 72006C6F 6E672075 6E736967 |.char.long unsig|
+# DATA-NEXT: 0030: 6E656420 696E7400 756E7369 676E6564 |ned int.unsigned|
# DATA-NEXT: 0040: 20696E74 00 | int.|
# DATA-NEXT: )
# DATA-NEXT: }
Index: lld/test/ELF/compress-debug-sections-zstd.s
===================================================================
--- lld/test/ELF/compress-debug-sections-zstd.s
+++ lld/test/ELF/compress-debug-sections-zstd.s
@@ -7,10 +7,10 @@
# CHECK: .debug_str PROGBITS [[#%x,]] [[#%x,]] [[#%x,]] 01 MS 0 0 1
# CHECK: Hex dump of section '.debug_str':
-# CHECK-NEXT: 0x00000000 756e7369 676e6564 20696e74 00636861 unsigned int.cha
-# CHECK-NEXT: 0x00000010 7200756e 7369676e 65642063 68617200 r.unsigned char.
-# CHECK-NEXT: 0x00000020 73686f72 7420756e 7369676e 65642069 short unsigned i
-# CHECK-NEXT: 0x00000030 6e74006c 6f6e6720 756e7369 676e6564 nt.long unsigned
+# CHECK-NEXT: 0x00000000 73686f72 7420756e 7369676e 65642069 short unsigned i
+# CHECK-NEXT: 0x00000010 6e740075 6e736967 6e656420 63686172 nt.unsigned char
+# CHECK-NEXT: 0x00000020 00636861 72006c6f 6e672075 6e736967 .char.long unsig
+# CHECK-NEXT: 0x00000030 6e656420 696e7400 756e7369 676e6564 ned int.unsigned
# CHECK-NEXT: 0x00000040 20696e74 00 int.
# RUN: ld.lld %t.o -o %t.so -shared --compress-debug-sections=zstd
Index: lld/test/ELF/comment-gc.s
===================================================================
--- lld/test/ELF/comment-gc.s
+++ lld/test/ELF/comment-gc.s
@@ -5,7 +5,8 @@
# RUN: llvm-objdump -s %t1 | FileCheck %s
# CHECK: Contents of section .comment:
-# CHECK-NEXT: .LLD 1.0.foo.bar
+# CHECK-NEXT: foo..LLD 1.0.bar
+# CHECK-NEXT: .{{$}}
.ident "foo"
Index: lld/ELF/InputSection.cpp
===================================================================
--- lld/ELF/InputSection.cpp
+++ lld/ELF/InputSection.cpp
@@ -1241,13 +1241,13 @@
// Optimize the common case.
do {
size_t size = strlen(p);
- pieces.emplace_back(p - s.begin(), xxHash64(StringRef(p, size)), live);
+ pieces.emplace_back(p - s.begin(), xxh3_64bits(StringRef(p, size)), live);
p += size + 1;
} while (p != end);
} else {
do {
size_t size = findNull(StringRef(p, end - p), entSize);
- pieces.emplace_back(p - s.begin(), xxHash64(StringRef(p, size)), live);
+ pieces.emplace_back(p - s.begin(), xxh3_64bits(StringRef(p, size)), live);
p += size + entSize;
} while (p != end);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154813.542045.patch
Type: text/x-patch
Size: 4062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230719/0924f4d3/attachment-0001.bin>
More information about the llvm-commits
mailing list