Skip to content

Commit d768b97

Browse files
[Support] change StringMap hash function from djbHash to xxHash
Depends on https://reviews.llvm.org/D142861. Alternative to https://reviews.llvm.org/D137601. xxHash is much faster than djbHash. This makes a simple Rust test case with a large constant string 10% faster to compile. Previous attempts at changing this hash function (e.g. https://reviews.llvm.org/D97396) had to be reverted due to breaking tests that depended on iteration order. No additional tests fail with this patch compared to `main` when running `check-all` with `-DLLVM_ENABLE_PROJECTS="all"` (on a Linux host), so I hope I found everything that needs to be changed. Differential Revision: https://reviews.llvm.org/D142862
1 parent 96aaebd commit d768b97

File tree

13 files changed

+75
-68
lines changed

13 files changed

+75
-68
lines changed

clang-tools-extra/test/modularize/ProblemsDisplayLists.modularize

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212

1313
# CHECK: These are the combined files, with problem files preceded by #:
1414

15-
# CHECK: {{.*}}Inputs/CompileError/HasError.h
1615
# CHECK: Inputs/CompileError/Level1A.h
16+
# CHECK: {{.*}}Inputs/CompileError/HasError.h

clang/unittests/Basic/SarifTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ TEST_F(SarifDocumentWriterTest, checkSerializingArtifacts) {
332332
TEST_F(SarifDocumentWriterTest, checkSerializingCodeflows) {
333333
// GIVEN:
334334
const std::string ExpectedOutput =
335-
R"({"$schema":"https://docs.oasis-open.org/sarif/sarif/v2.1.0/cos02/schemas/sarif-schema-2.1.0.json","runs":[{"artifacts":[{"length":27,"location":{"index":1,"uri":"file:///test-header-1.h"},"mimeType":"text/plain","roles":["resultFile"]},{"length":30,"location":{"index":2,"uri":"file:///test-header-2.h"},"mimeType":"text/plain","roles":["resultFile"]},{"length":28,"location":{"index":3,"uri":"file:///test-header-3.h"},"mimeType":"text/plain","roles":["resultFile"]},{"length":41,"location":{"index":0,"uri":"file:///main.cpp"},"mimeType":"text/plain","roles":["resultFile"]}],"columnKind":"unicodeCodePoints","results":[{"codeFlows":[{"threadFlows":[{"locations":[{"importance":"essential","location":{"message":{"text":"Message #1"},"physicalLocation":{"artifactLocation":{"index":1,"uri":"file:///test-header-1.h"},"region":{"endColumn":8,"endLine":2,"startColumn":1,"startLine":1}}}},{"importance":"important","location":{"message":{"text":"Message #2"},"physicalLocation":{"artifactLocation":{"index":2,"uri":"file:///test-header-2.h"},"region":{"endColumn":8,"endLine":2,"startColumn":1,"startLine":1}}}},{"importance":"unimportant","location":{"message":{"text":"Message #3"},"physicalLocation":{"artifactLocation":{"index":3,"uri":"file:///test-header-3.h"},"region":{"endColumn":8,"endLine":2,"startColumn":1,"startLine":1}}}}]}]}],"level":"warning","locations":[{"physicalLocation":{"artifactLocation":{"index":0,"uri":"file:///main.cpp"},"region":{"endColumn":8,"endLine":2,"startColumn":5,"startLine":2}}}],"message":{"text":"Redefinition of 'foo'"},"ruleId":"clang.unittest","ruleIndex":0}],"tool":{"driver":{"fullName":"sarif test runner","informationUri":"https://clang.llvm.org/docs/UsersManual.html","language":"en-US","name":"sarif test","rules":[{"defaultConfiguration":{"enabled":true,"level":"warning","rank":-1},"fullDescription":{"text":"Example rule created during unit tests"},"id":"clang.unittest","name":"clang unit test"}],"version":"1.0.0"}}}],"version":"2.1.0"})";
335+
R"({"$schema":"https://docs.oasis-open.org/sarif/sarif/v2.1.0/cos02/schemas/sarif-schema-2.1.0.json","runs":[{"artifacts":[{"length":28,"location":{"index":3,"uri":"file:///test-header-3.h"},"mimeType":"text/plain","roles":["resultFile"]},{"length":41,"location":{"index":0,"uri":"file:///main.cpp"},"mimeType":"text/plain","roles":["resultFile"]},{"length":30,"location":{"index":2,"uri":"file:///test-header-2.h"},"mimeType":"text/plain","roles":["resultFile"]},{"length":27,"location":{"index":1,"uri":"file:///test-header-1.h"},"mimeType":"text/plain","roles":["resultFile"]}],"columnKind":"unicodeCodePoints","results":[{"codeFlows":[{"threadFlows":[{"locations":[{"importance":"essential","location":{"message":{"text":"Message #1"},"physicalLocation":{"artifactLocation":{"index":1,"uri":"file:///test-header-1.h"},"region":{"endColumn":8,"endLine":2,"startColumn":1,"startLine":1}}}},{"importance":"important","location":{"message":{"text":"Message #2"},"physicalLocation":{"artifactLocation":{"index":2,"uri":"file:///test-header-2.h"},"region":{"endColumn":8,"endLine":2,"startColumn":1,"startLine":1}}}},{"importance":"unimportant","location":{"message":{"text":"Message #3"},"physicalLocation":{"artifactLocation":{"index":3,"uri":"file:///test-header-3.h"},"region":{"endColumn":8,"endLine":2,"startColumn":1,"startLine":1}}}}]}]}],"level":"warning","locations":[{"physicalLocation":{"artifactLocation":{"index":0,"uri":"file:///main.cpp"},"region":{"endColumn":8,"endLine":2,"startColumn":5,"startLine":2}}}],"message":{"text":"Redefinition of 'foo'"},"ruleId":"clang.unittest","ruleIndex":0}],"tool":{"driver":{"fullName":"sarif test runner","informationUri":"https://clang.llvm.org/docs/UsersManual.html","language":"en-US","name":"sarif test","rules":[{"defaultConfiguration":{"enabled":true,"level":"warning","rank":-1},"fullDescription":{"text":"Example rule created during unit tests"},"id":"clang.unittest","name":"clang unit test"}],"version":"1.0.0"}}}],"version":"2.1.0"})";
336336

337337
const char *SourceText = "int foo = 0;\n"
338338
"int foo = 1;\n"

compiler-rt/test/profile/Linux/instrprof-show-debug-info-correlation.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// RUN: not llvm-profdata show --debug-info=%t.no.dbg 2>&1 | FileCheck %s --check-prefix NO-DBG
77
// NO-DBG: unable to correlate profile: could not find any profile metadata in debug info
88

9-
// CHECK: a
109
// YAML: Probes:
1110
// YAML: - Function Name: a
1211
// YAML: Linkage Name: a
@@ -17,7 +16,6 @@
1716
// YAML: Line: [[@LINE+1]]
1817
void a() {}
1918

20-
// CHECK: b
2119
// YAML: - Function Name: b
2220
// YAML: Linkage Name: b
2321
// YAML: CFG Hash: 0x[[#%.1X,HASH:]]
@@ -27,7 +25,6 @@ void a() {}
2725
// YAML: Line: [[@LINE+1]]
2826
void b() {}
2927

30-
// CHECK: main
3128
// YAML: - Function Name: main
3229
// YAML: Linkage Name: main
3330
// YAML: CFG Hash: 0x[[#%.1X,HASH:]]
@@ -37,5 +34,8 @@ void b() {}
3734
// YAML: Line: [[@LINE+1]]
3835
int main() { return 0; }
3936

37+
// CHECK: main
38+
// CHECK: a
39+
// CHECK: b
4040
// CHECK: Counters section size: 0x18 bytes
4141
// CHECK: Found 3 functions

lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,11 @@ def vRun(self, packet):
338338
lldb.SBError()) # error
339339

340340
self.assertPacketLogContains([
341-
"QEnvironment:PLAIN=foo",
342-
"QEnvironmentHexEncoded:4e45454453454e433d66726f6224",
343-
"QEnvironmentHexEncoded:4e45454453454e43323d66722a6f62",
344341
"QEnvironmentHexEncoded:4e45454453454e43333d66726f7d62",
345342
"QEnvironmentHexEncoded:4e45454453454e43343d6623726f62",
343+
"QEnvironment:PLAIN=foo",
344+
"QEnvironmentHexEncoded:4e45454453454e43323d66722a6f62",
345+
"QEnvironmentHexEncoded:4e45454453454e433d66726f6224",
346346
"QEnvironment:EQUALS=foo=bar",
347347
])
348348

@@ -386,11 +386,11 @@ def QEnvironment(self, packet):
386386
lldb.SBError()) # error
387387

388388
self.assertPacketLogContains([
389-
"QEnvironmentHexEncoded:504c41494e3d666f6f",
390-
"QEnvironmentHexEncoded:4e45454453454e433d66726f6224",
391-
"QEnvironmentHexEncoded:4e45454453454e43323d66722a6f62",
392389
"QEnvironmentHexEncoded:4e45454453454e43333d66726f7d62",
393390
"QEnvironmentHexEncoded:4e45454453454e43343d6623726f62",
391+
"QEnvironmentHexEncoded:504c41494e3d666f6f",
392+
"QEnvironmentHexEncoded:4e45454453454e43323d66722a6f62",
393+
"QEnvironmentHexEncoded:4e45454453454e433d66726f6224",
394394
"QEnvironmentHexEncoded:455155414c533d666f6f3d626172",
395395
])
396396

llvm/lib/Support/StringMap.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
#include "llvm/ADT/StringMap.h"
14-
#include "llvm/Support/DJB.h"
1514
#include "llvm/Support/MathExtras.h"
15+
#include "llvm/Support/xxhash.h"
1616

1717
using namespace llvm;
1818

@@ -84,7 +84,7 @@ unsigned StringMapImpl::LookupBucketFor(StringRef Name) {
8484
// Hash table unallocated so far?
8585
if (NumBuckets == 0)
8686
init(16);
87-
unsigned FullHashValue = djbHash(Name, 0);
87+
unsigned FullHashValue = xxHash64(Name);
8888
unsigned BucketNo = FullHashValue & (NumBuckets - 1);
8989
unsigned *HashTable = getHashTable(TheTable, NumBuckets);
9090

@@ -139,7 +139,7 @@ unsigned StringMapImpl::LookupBucketFor(StringRef Name) {
139139
int StringMapImpl::FindKey(StringRef Key) const {
140140
if (NumBuckets == 0)
141141
return -1; // Really empty table?
142-
unsigned FullHashValue = djbHash(Key, 0);
142+
unsigned FullHashValue = xxHash64(Key);
143143
unsigned BucketNo = FullHashValue & (NumBuckets - 1);
144144
unsigned *HashTable = getHashTable(TheTable, NumBuckets);
145145

llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828

2929
; Check that all the names are present in the output
3030
; CHECK: Hash 0x597841
31-
; CHECK: String: 0x{{[0-9a-f]*}} "is"
3231
; CHECK: String: 0x{{[0-9a-f]*}} "k1"
32+
; CHECK: String: 0x{{[0-9a-f]*}} "is"
3333

3434
; CHECK: Hash 0xa4b42a1e
35-
; CHECK: String: 0x{{[0-9a-f]*}} "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE"
3635
; CHECK: String: 0x{{[0-9a-f]*}} "_ZN4llvm16DenseMapIteratorIPNS_10MDLocationENS_6detail13DenseSetEmptyENS_10MDNodeInfoIS1_EENS3_12DenseSetPairIS2_EELb0EE23AdvancePastEmptyBucketsEv"
36+
; CHECK: String: 0x{{[0-9a-f]*}} "_ZN5clang23DataRecursiveASTVisitorIN12_GLOBAL__N_124UnusedBackingIvarCheckerEE26TraverseCUDAKernelCallExprEPNS_18CUDAKernelCallExprE"
3737

3838
; CHECK: Hash 0xeee7c0b2
3939
; CHECK: String: 0x{{[0-9a-f]*}} "_ZNK4llvm12LivePhysRegs5printERNS_11raw_ostreamE"

llvm/test/DebugInfo/Generic/debug-names-hash-collisions.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@
2929
; Check that all the names are present in the output
3030
; CHECK: Bucket 0
3131
; CHECK: Hash: 0xF8CF70D
32-
; CHECK-NEXT:String: 0x{{[0-9a-f]*}} "_ZN4lldb7SBBlockaSERKS0_"
33-
; CHECK: Hash: 0xF8CF70D
3432
; CHECK-NEXT:String: 0x{{[0-9a-f]*}} "_ZN4lldb7SBBlockC1ERKS0_"
35-
; CHECK: Hash: 0x135A482C
36-
; CHECK-NEXT:String: 0x{{[0-9a-f]*}} "_ZN4lldb7SBErroraSERKS0_"
33+
; CHECK: Hash: 0xF8CF70D
34+
; CHECK-NEXT:String: 0x{{[0-9a-f]*}} "_ZN4lldb7SBBlockaSERKS0_"
3735
; CHECK: Hash: 0x135A482C
3836
; CHECK-NEXT:String: 0x{{[0-9a-f]*}} "_ZN4lldb7SBErrorC1ERKS0_"
37+
; CHECK: Hash: 0x135A482C
38+
; CHECK-NEXT:String: 0x{{[0-9a-f]*}} "_ZN4lldb7SBErroraSERKS0_"
3939
; CHECK-NOT: String:
4040
; CHECK: Bucket 1
4141
; CHECK-NEXT: EMPTY
4242
; CHECK: Bucket 2
4343
; CHECK: Hash: 0x2841B989
44-
; CHECK-NEXT:String: 0x{{[0-9a-f]*}} "_ZL11numCommutes"
45-
; CHECK: Hash: 0x2841B989
4644
; CHECK-NEXT:String: 0x{{[0-9a-f]*}} "_ZL11NumCommutes"
45+
; CHECK: Hash: 0x2841B989
46+
; CHECK-NEXT:String: 0x{{[0-9a-f]*}} "_ZL11numCommutes"
4747
; CHECK: Hash: 0x3E190F5F
4848
; CHECK-NEXT:String: 0x{{[0-9a-f]*}} "_ZL9NumRemats"
4949
; CHECK: Hash: 0x3E190F5F

llvm/test/DebugInfo/X86/debug-pubtables-dwarf64.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
; CHECK: .debug_pubtypes contents:
2020
; CHECK-NEXT: length = 0x0000000000000032, format = DWARF64, version = 0x0002, unit_offset =
2121
; CHECK-NEXT: Offset Name
22-
; CHECK-NEXT: 0x00000000[[STRUCT]] "Foo"
2322
; CHECK-NEXT: 0x00000000[[BASET]] "int"
23+
; CHECK-NEXT: 0x00000000[[STRUCT]] "Foo"
2424

2525
; IR generated and reduced from:
2626
; $ cat foo.c

llvm/test/DebugInfo/X86/gnu-public-names-gmlt.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
; GPUB: .debug_gnu_pubnames contents:
1818
; GPUB-NEXT: unit_offset = 0x00000000
1919
; GPUB-NEXT: Name
20-
; GPUB-NEXT: "f2"
2120
; GPUB-NEXT: "f3"
21+
; GPUB-NEXT: "f2"
2222

2323
; GPUB: .debug_gnu_pubtypes contents:
2424
; GPUB-NEXT: length = 0x0000000e, format = DWARF32, version = 0x0002, unit_offset = 0x00000000

llvm/test/DebugInfo/X86/gnu-public-names.ll

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666

6767
; ASM: .section .debug_gnu_pubnames
6868
; ASM: .byte 32 # Attributes: VARIABLE, EXTERNAL
69+
; ASM-NEXT: .asciz "ns::global_namespace_variable" # External Name
70+
; ASM: .byte 32 # Attributes: VARIABLE, EXTERNAL
6971
; ASM-NEXT: .asciz "global_variable" # External Name
7072

7173
; ASM: .section .debug_gnu_pubtypes
@@ -123,7 +125,7 @@
123125
; CHECK: DW_AT_name ("global_namespace_function")
124126
; CHECK: NULL
125127

126-
; CHECK: DW_TAG_subprogram
128+
; CHECK: [[F3:0x[0-9a-f]+]]: DW_TAG_subprogram
127129
; CHECK: DW_AT_name ("f3")
128130
; CHECK: [[F3_Z:.*]]: DW_TAG_variable
129131
; CHECK: DW_AT_name ("z")
@@ -184,48 +186,53 @@
184186
; CHECK: DW_AT_linkage_name
185187
; CHECK: DW_AT_name ("global_function")
186188

187-
; CHECK: DW_TAG_subprogram
189+
; CHECK: [[GLOBAL_F7:0x[0-9a-f]+]]: DW_TAG_subprogram
190+
; CHECK: DW_AT_linkage_name
191+
; CHECK: DW_AT_name ("f7")
192+
188193
; CHECK: DW_TAG_pointer_type
189194
; CHECK: DW_TAG_pointer_type
190195
; CHECK: NULL
191196

192197
; CHECK-LABEL: .debug_gnu_pubnames contents:
193198
; CHECK-NEXT: length = {{.*}}, version = 0x0002, unit_offset = 0x00000000, unit_size = {{.*}}
194199
; CHECK-NEXT: Offset Linkage Kind Name
200+
; CHECK-NEXT: [[ANON_INNER_B]] STATIC VARIABLE "(anonymous namespace)::inner::b"
201+
; CHECK-NEXT: [[MEM_FUNC]] EXTERNAL FUNCTION "C::member_function"
202+
; CHECK-NEXT: [[OUTER]] EXTERNAL TYPE "outer"
203+
; CHECK-NEXT: [[GLOB_NS_VAR]] EXTERNAL VARIABLE "ns::global_namespace_variable"
204+
; CHECK-NEXT: [[GLOB_VAR]] EXTERNAL VARIABLE "global_variable"
205+
; CHECK-NEXT: [[UNNAMED_ENUM_ENUMERATOR]] STATIC VARIABLE "unnamed_enum_enumerator"
206+
; CHECK-NEXT: [[GLOBAL_F7]] EXTERNAL FUNCTION "f7"
207+
; CHECK-NEXT: [[OUTER_ANON]] EXTERNAL TYPE "outer::(anonymous namespace)"
208+
; FIXME: GCC produces enumerators as EXTERNAL, not STATIC
209+
; CHECK-NEXT: [[NAMED_ENUM_CLASS_ENUMERATOR]] STATIC VARIABLE "named_enum_class_enumerator"
195210
; CHECK-NEXT: [[GLOBAL_FUNC]] EXTERNAL FUNCTION "global_function"
211+
; CHECK-NEXT: [[GLOB_NS_FUNC]] EXTERNAL FUNCTION "ns::global_namespace_function"
196212
; CHECK-NEXT: [[NS]] EXTERNAL TYPE "ns"
213+
; CHECK-NEXT: [[NAMED_ENUM_ENUMERATOR]] STATIC VARIABLE "named_enum_enumerator"
214+
; CHECK-NEXT: [[ANON]] EXTERNAL TYPE "(anonymous namespace)"
197215
; CHECK-NEXT: [[OUTER_ANON_C]] STATIC VARIABLE "outer::(anonymous namespace)::c"
216+
; CHECK-NEXT: [[D_VAR]] EXTERNAL VARIABLE "ns::d"
217+
; CHECK-NEXT: [[STATIC_MEM_FUNC]] EXTERNAL FUNCTION "C::static_member_function"
218+
; CHECK-NEXT: [[STATIC_MEM_VAR]] EXTERNAL VARIABLE "C::static_member_variable"
198219
; CHECK-NEXT: [[ANON_I]] STATIC VARIABLE "(anonymous namespace)::i"
199-
; CHECK-NEXT: [[GLOB_NS_FUNC]] EXTERNAL FUNCTION "ns::global_namespace_function"
220+
; CHECK-NEXT: [[ANON_INNER]] EXTERNAL TYPE "(anonymous namespace)::inner"
221+
; CHECK-NEXT: [[F3]] EXTERNAL FUNCTION "f3"
200222
; GCC Doesn't put local statics in pubnames, but it seems not unreasonable and
201223
; comes out naturally from LLVM's implementation, so I'm OK with it for now. If
202224
; it's demonstrated that this is a major size concern or degrades debug info
203225
; consumer behavior, feel free to change it.
204226
; CHECK-NEXT: [[F3_Z]] STATIC VARIABLE "f3::z"
205-
; CHECK-NEXT: [[ANON]] EXTERNAL TYPE "(anonymous namespace)"
206-
; CHECK-NEXT: [[OUTER_ANON]] EXTERNAL TYPE "outer::(anonymous namespace)"
207-
; CHECK-NEXT: [[ANON_INNER_B]] STATIC VARIABLE "(anonymous namespace)::inner::b"
208-
; CHECK-NEXT: [[OUTER]] EXTERNAL TYPE "outer"
209-
; FIXME: GCC produces enumerators as EXTERNAL, not STATIC
210-
; CHECK-NEXT: [[NAMED_ENUM_CLASS_ENUMERATOR]] STATIC VARIABLE "named_enum_class_enumerator"
211-
; CHECK-NEXT: [[MEM_FUNC]] EXTERNAL FUNCTION "C::member_function"
212-
; CHECK-NEXT: [[GLOB_VAR]] EXTERNAL VARIABLE "global_variable"
213-
; CHECK-NEXT: [[GLOB_NS_VAR]] EXTERNAL VARIABLE "ns::global_namespace_variable"
214-
; CHECK-NEXT: [[ANON_INNER]] EXTERNAL TYPE "(anonymous namespace)::inner"
215-
; CHECK-NEXT: [[D_VAR]] EXTERNAL VARIABLE "ns::d"
216-
; CHECK-NEXT: [[NAMED_ENUM_ENUMERATOR]] STATIC VARIABLE "named_enum_enumerator"
217-
; CHECK-NEXT: [[STATIC_MEM_VAR]] EXTERNAL VARIABLE "C::static_member_variable"
218-
; CHECK-NEXT: [[STATIC_MEM_FUNC]] EXTERNAL FUNCTION "C::static_member_function"
219-
; CHECK-NEXT: [[UNNAMED_ENUM_ENUMERATOR]] STATIC VARIABLE "unnamed_enum_enumerator"
220227

221228
; CHECK-LABEL: debug_gnu_pubtypes contents:
222229
; CHECK: Offset Linkage Kind Name
230+
; CHECK-NEXT: [[INT]] STATIC TYPE "int"
223231
; CHECK-NEXT: [[C]] EXTERNAL TYPE "C"
224232
; CHECK-NEXT: [[UNSIGNED_INT]] STATIC TYPE "unsigned int"
225-
; CHECK-NEXT: [[D]] EXTERNAL TYPE "ns::D"
226233
; CHECK-NEXT: [[NAMED_ENUM]] EXTERNAL TYPE "named_enum"
227-
; CHECK-NEXT: [[INT]] STATIC TYPE "int"
228234
; CHECK-NEXT: [[NAMED_ENUM_CLASS]] EXTERNAL TYPE "named_enum_class"
235+
; CHECK-NEXT: [[D]] EXTERNAL TYPE "ns::D"
229236

230237
%struct.C = type { i8 }
231238
%"struct.ns::D" = type { i32 }

llvm/test/tools/dsymutil/ARM/extern-alias.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ $ xcrun --sdk iphoneos clang private_extern.o main.o -target arm64-apple-ios14.0
3838
RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/private_extern/private_extern.out -o %t.dSYM --verbose | FileCheck %s
3939
RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/extern/extern.out -o %t.dSYM --verbose | FileCheck %s
4040
CHECK-NOT: could not find object file symbol for symbol _baz
41-
CHECK: { sym: _foo, objAddr: 0x0, binAddr: 0x100007F58, size: 0x20 }
4241
CHECK: { sym: _baz, objAddr: 0x0, binAddr: 0x100007F58, size: 0x0 }
42+
CHECK: { sym: _foo, objAddr: 0x0, binAddr: 0x100007F58, size: 0x20 }

llvm/test/tools/llvm-profdata/suppl-instr-with-sample.test

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ RUN: -supplement-instr-with-sample=%p/Inputs/mix_sample.proftext \
66
RUN: -suppl-min-size-threshold=0 %p/Inputs/mix_instr.proftext -o %t
77
RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX1
88

9-
MIX1: foo:
10-
MIX1-NEXT: Hash: 0x0000000000000007
11-
MIX1-NEXT: Counters: 5
12-
MIX1-NEXT: Block counts: [12, 13, 0, 0, 0]
139
MIX1: goo:
1410
MIX1-NEXT: Hash: 0x0000000000000005
1511
MIX1-NEXT: Counters: 3
1612
MIX1-NOT: Block counts:
1713
MIX1-SAME: <PseudoHot>
14+
MIX1: foo:
15+
MIX1-NEXT: Hash: 0x0000000000000007
16+
MIX1-NEXT: Counters: 5
17+
MIX1-NEXT: Block counts: [12, 13, 0, 0, 0]
1818
MIX1: moo:
1919
MIX1-NEXT: Hash: 0x0000000000000009
2020
MIX1-NEXT: Counters: 4
@@ -27,16 +27,16 @@ RUN: -suppl-min-size-threshold=0 -zero-counter-threshold=0.5 \
2727
RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr.proftext -o %t
2828
RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX2
2929

30-
MIX2: foo:
31-
MIX2-NEXT: Hash: 0x0000000000000007
32-
MIX2-NEXT: Counters: 5
33-
MIX2-NOT: Block counts:
34-
MIX2-SAME: <PseudoHot>
3530
MIX2: goo:
3631
MIX2-NEXT: Hash: 0x0000000000000005
3732
MIX2-NEXT: Counters: 3
3833
MIX2-NOT: Block counts:
3934
MIX2-SAME: <PseudoHot>
35+
MIX2: foo:
36+
MIX2-NEXT: Hash: 0x0000000000000007
37+
MIX2-NEXT: Counters: 5
38+
MIX2-NOT: Block counts:
39+
MIX2-SAME: <PseudoHot>
4040
MIX2: moo:
4141
MIX2-NEXT: Hash: 0x0000000000000009
4242
MIX2-NEXT: Counters: 4
@@ -49,15 +49,15 @@ RUN: -suppl-min-size-threshold=0 -zero-counter-threshold=0.7 \
4949
RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr.proftext -o %t
5050
RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX3
5151

52-
MIX3: foo:
53-
MIX3-NEXT: Hash: 0x0000000000000007
54-
MIX3-NEXT: Counters: 5
55-
MIX3-NEXT: Block counts: [1384, 1500, 0, 0, 0]
5652
MIX3: goo:
5753
MIX3-NEXT: Hash: 0x0000000000000005
5854
MIX3-NEXT: Counters: 3
5955
MIX3-NOT: Block counts:
6056
MIX3-SAME: <PseudoHot>
57+
MIX3: foo:
58+
MIX3-NEXT: Hash: 0x0000000000000007
59+
MIX3-NEXT: Counters: 5
60+
MIX3-NEXT: Block counts: [1384, 1500, 0, 0, 0]
6161
MIX3: moo:
6262
MIX3-NEXT: Hash: 0x0000000000000009
6363
MIX3-NEXT: Counters: 4
@@ -71,15 +71,15 @@ RUN: -suppl-min-size-threshold=2 -zero-counter-threshold=0.7 \
7171
RUN: -instr-prof-cold-threshold=30 %p/Inputs/mix_instr_small.proftext -o %t
7272
RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=MIX4
7373

74-
MIX4: foo:
75-
MIX4-NEXT: Hash: 0x0000000000000007
76-
MIX4-NEXT: Counters: 1
77-
MIX4-NEXT: Block counts: [0]
7874
MIX4: goo:
7975
MIX4-NEXT: Hash: 0x0000000000000005
8076
MIX4-NEXT: Counters: 3
8177
MIX4-NOT: Block counts:
8278
MIX4-SAME: <PseudoHot>
79+
MIX4: foo:
80+
MIX4-NEXT: Hash: 0x0000000000000007
81+
MIX4-NEXT: Counters: 1
82+
MIX4-NEXT: Block counts: [0]
8383
MIX4: moo:
8484
MIX4-NEXT: Hash: 0x0000000000000009
8585
MIX4-NEXT: Counters: 1

mlir/test/mlir-lsp-server/completion.test

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,18 @@
8484
// CHECK-NEXT: "isIncomplete": false,
8585
// CHECK-NEXT: "items": [
8686
// CHECK-NEXT: {
87-
// CHECK-NEXT: "detail": "builtin.unrealized_conversion_cast: !pdl.value",
88-
// CHECK-NEXT: "insertText": "cast",
87+
// CHECK-NEXT: "detail": "arg #0: i32",
88+
// CHECK-NEXT: "insertText": "arg",
8989
// CHECK-NEXT: "insertTextFormat": 1,
9090
// CHECK-NEXT: "kind": 6,
91-
// CHECK-NEXT: "label": "%cast"
91+
// CHECK-NEXT: "label": "%arg"
9292
// CHECK-NEXT: },
9393
// CHECK-NEXT: {
94-
// CHECK-NEXT: "detail": "arg #0: i32",
95-
// CHECK-NEXT: "insertText": "arg",
94+
// CHECK-NEXT: "detail": "builtin.unrealized_conversion_cast: !pdl.value",
95+
// CHECK-NEXT: "insertText": "cast",
9696
// CHECK-NEXT: "insertTextFormat": 1,
9797
// CHECK-NEXT: "kind": 6,
98-
// CHECK-NEXT: "label": "%arg"
98+
// CHECK-NEXT: "label": "%cast"
9999
// CHECK-NEXT: }
100100
// CHECK: ]
101101
// CHECK-NEXT: }

0 commit comments

Comments
 (0)