Skip to content

Commit 7856842

Browse files
committed
[Test] Renamed with underscores.
Hyphens are not typically used in identifiers and make it a bit trickier to search.
1 parent 97937c5 commit 7856842

File tree

5 files changed

+49
-49
lines changed

5 files changed

+49
-49
lines changed

lib/SIL/Utils/PrunedLiveness.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ namespace swift::test {
169169
// - the insertion points
170170
static FunctionTest
171171
PrunedLivenessBoundaryWithListOfLastUsersInsertionPointsTest(
172-
"pruned-liveness-boundary-with-list-of-last-users-insertion-points",
172+
"pruned_liveness_boundary_with_list_of_last_users_insertion_points",
173173
[](auto &function, auto &arguments, auto &test) {
174174
PrunedLivenessBoundary boundary;
175175
while (arguments.hasUntaken()) {
@@ -346,7 +346,7 @@ namespace swift::test {
346346
// - SILValue: value to a analyze
347347
// Dumps:
348348
// - the liveness result and boundary
349-
static FunctionTest SSALivenessTest("ssa-liveness", [](auto &function,
349+
static FunctionTest SSALivenessTest("ssa_liveness", [](auto &function,
350350
auto &arguments,
351351
auto &test) {
352352
auto value = arguments.takeValue();
@@ -617,7 +617,7 @@ namespace swift::test {
617617
// locations. In that case, the def nodes may be stores and the uses may be
618618
// destroy_addrs.
619619
static FunctionTest MultiDefUseLivenessTest(
620-
"multidefuse-liveness", [](auto &function, auto &arguments, auto &test) {
620+
"multidefuse_liveness", [](auto &function, auto &arguments, auto &test) {
621621
SmallVector<SILBasicBlock *, 8> discoveredBlocks;
622622
MultiDefPrunedLiveness liveness(&function, &discoveredBlocks);
623623

@@ -747,7 +747,7 @@ namespace swift::test {
747747
// Computes liveness for the specified def nodes by finding all their direct SSA
748748
// uses. If the def is an instruction, then all results are considered.
749749
static FunctionTest MultiDefLivenessTest(
750-
"multidef-liveness", [](auto &function, auto &arguments, auto &test) {
750+
"multidef_liveness", [](auto &function, auto &arguments, auto &test) {
751751
SmallVector<SILBasicBlock *, 8> discoveredBlocks;
752752
MultiDefPrunedLiveness liveness(&function, &discoveredBlocks);
753753

test/SIL/OwnershipVerifier/guaranteed_chain.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct PairC {
1515
//
1616
sil [ossa] @testSSALongForwardingChain : $@convention(thin) (@guaranteed C) -> () {
1717
bb0(%0 : @guaranteed $C):
18-
specify_test "ssa-liveness @trace[0]"
18+
specify_test "ssa_liveness @trace[0]"
1919
debug_value [trace] %0 : $C
2020
%s0 = struct $PairC(%0 : $C, %0 : $C)
2121
%s0a = struct_extract %s0 : $PairC, #PairC.first

test/SILOptimizer/liveness_incomplete_unit.sil

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ enum Never {}
2020

2121
class C {}
2222

23-
// CHECK-LABEL: testDeadTerminatorResult: ssa-liveness
23+
// CHECK-LABEL: testDeadTerminatorResult: ssa_liveness
2424
// CHECK-LABEL: SSA lifetime analysis: %{{.*}} = argument of bb1 : $C
2525
// CHECK: bb1: LiveWithin
2626
// CHECK-NOT: "last user"
@@ -31,7 +31,7 @@ bb0(%0 : @owned $FakeOptional<C>):
3131
switch_enum %0 : $FakeOptional<C>, case #FakeOptional.some!enumelt: bb1, case #FakeOptional.none!enumelt: bb2
3232

3333
bb1(%payload : @owned $C):
34-
specify_test "ssa-liveness @trace[0]"
34+
specify_test "ssa_liveness @trace[0]"
3535
debug_value [trace] %payload : $C
3636
unreachable
3737

@@ -40,7 +40,7 @@ bb2:
4040
return %99 : $()
4141
}
4242

43-
// CHECK-LABEL: testDeadPhi: ssa-liveness
43+
// CHECK-LABEL: testDeadPhi: ssa_liveness
4444
// CHECK: SSA lifetime analysis: %{{.*}} = argument of bb3 : $C
4545
// CHECK: bb3: LiveWithin
4646
// CHECK: dead def: %{{.*}} = argument of bb3 : $C
@@ -55,19 +55,19 @@ bb2:
5555
br bb3(%1 : $C)
5656

5757
bb3(%2 : @owned $C):
58-
specify_test "ssa-liveness @trace[0]"
58+
specify_test "ssa_liveness @trace[0]"
5959
debug_value [trace] %2 : $C
6060
unreachable
6161
}
6262

63-
// CHECK-LABEL: testDeadInstruction: ssa-liveness
63+
// CHECK-LABEL: testDeadInstruction: ssa_liveness
6464
// CHECK: SSA lifetime analysis: %{{.*}} = copy_value %0 : $C
6565
// CHECK: bb0: LiveWithin
6666
// CHECK: dead def: %{{.*}} = copy_value %0 : $C
6767
sil [ossa] @testDeadInstruction : $@convention(thin) (@guaranteed C) -> () {
6868
bb0(%0 : @guaranteed $C):
6969
%1 = copy_value %0 : $C
70-
specify_test "ssa-liveness @trace[0]"
70+
specify_test "ssa_liveness @trace[0]"
7171
debug_value [trace] %1 : $C
7272
unreachable
7373
}
@@ -76,7 +76,7 @@ bb0(%0 : @guaranteed $C):
7676
// boundary. Once as a last use, and once as a dead def.
7777
// This is a particularly problematic corner case.
7878
//
79-
// CHECK-LABEL: testDeadSelfKill: multidef-liveness
79+
// CHECK-LABEL: testDeadSelfKill: multidef_liveness
8080
// CHECK: MultiDef lifetime analysis:
8181
// CHECK: def value: %1 = argument of bb1 : $C
8282
// CHECK: def value: [[V:%.*]] = move_value %1 : $C
@@ -89,7 +89,7 @@ bb0:
8989
br bb3
9090

9191
bb1(%1 : @owned $C):
92-
specify_test "multidef-liveness @trace[0] @trace[1]"
92+
specify_test "multidef_liveness @trace[0] @trace[1]"
9393
debug_value [trace] %1 : $C
9494
%2 = move_value %1 : $C
9595
debug_value [trace] %2 : $C
@@ -127,7 +127,7 @@ bb0(%0 : @guaranteed $C, %1 : $@thick Never.Type):
127127
// A dead-end block with a def can still be a boundary edge. This can
128128
// only happen in OSSA with incomplete lifetimes.
129129
//
130-
// CHECK-LABEL: testMultiDefDeadDefBoundaryEdge: multidef-liveness
130+
// CHECK-LABEL: testMultiDefDeadDefBoundaryEdge: multidef_liveness
131131
// CHECK: MultiDef lifetime analysis:
132132
// CHECK: def value: [[CP0:%.*]] = copy_value %0 : $C
133133
// CHECK: def value: [[CP3:%.*]] = copy_value %0 : $C
@@ -140,7 +140,7 @@ bb0(%0 : @guaranteed $C, %1 : $@thick Never.Type):
140140
sil [ossa] @testMultiDefDeadDefBoundaryEdge : $@convention(thin) (@guaranteed C) -> () {
141141
bb0(%0 : @guaranteed $C):
142142
%copy0 = copy_value %0 : $C
143-
specify_test "multidef-liveness @trace[0] @trace[1]"
143+
specify_test "multidef_liveness @trace[0] @trace[1]"
144144
debug_value [trace] %copy0 : $C
145145
cond_br undef, bb1, bb3
146146

test/SILOptimizer/liveness_unit.sil

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ struct PairC {
2020
var second: C
2121
}
2222

23-
// CHECK-LABEL: testSelfLoop: ssa-liveness
23+
// CHECK-LABEL: testSelfLoop: ssa_liveness
2424
// CHECK: SSA lifetime analysis: [[V:%.*]] = copy_value %0 : $C
2525
// CHECK: bb1: LiveOut
2626
// CHECK: bb2: LiveWithin
@@ -34,7 +34,7 @@ bb0(%0 : @guaranteed $C):
3434
bb1(%1 : @owned $C):
3535
destroy_value %1 : $C
3636
%2 = copy_value %0 : $C
37-
specify_test "ssa-liveness @trace[0]"
37+
specify_test "ssa_liveness @trace[0]"
3838
debug_value [trace] %2 : $C
3939
br bb2
4040

@@ -46,7 +46,7 @@ bb3:
4646
return %99 : $()
4747
}
4848

49-
// CHECK-LABEL: testSelfKill: ssa-liveness
49+
// CHECK-LABEL: testSelfKill: ssa_liveness
5050
// CHECK:SSA lifetime analysis: [[V:%.*]] = move_value %1 : $C
5151
// CHECK: bb1: LiveOut
5252
// CHECK: bb2: LiveWithin
@@ -59,7 +59,7 @@ bb0:
5959

6060
bb1(%1 : @owned $C):
6161
%2 = move_value %1 : $C
62-
specify_test "ssa-liveness @trace[0]"
62+
specify_test "ssa_liveness @trace[0]"
6363
debug_value [trace] %2 : $C
6464
br bb2
6565

@@ -77,7 +77,7 @@ bb3:
7777
//
7878
// This live range is not dominated by the original borrow.
7979
//
80-
// CHECK-LABEL: testReborrow: multidef-liveness
80+
// CHECK-LABEL: testReborrow: multidef_liveness
8181
// CHECK: MultiDef lifetime analysis:
8282
// CHECK: def value: [[B:%.*]] = begin_borrow %0 : $C
8383
// CHECK: def value: [[RB:%.*]] = argument of bb3 : $C
@@ -97,7 +97,7 @@ bb1:
9797

9898
bb2:
9999
%borrow2 = begin_borrow %0 : $C
100-
specify_test "multidef-liveness @trace[0] @trace[1]"
100+
specify_test "multidef_liveness @trace[0] @trace[1]"
101101
debug_value [trace] %borrow2 : $C
102102
br bb3(%borrow2 : $C)
103103

@@ -112,7 +112,7 @@ bb4:
112112
return %99 : $()
113113
}
114114

115-
// CHECK-LABEL: testGuaranteedForwarding: ssa-liveness
115+
// CHECK-LABEL: testGuaranteedForwarding: ssa_liveness
116116
// CHECK: SSA lifetime analysis: [[C:%.*]] = unchecked_ref_cast %{{.*}} : $D to $C
117117
// CHECK: bb0: LiveWithin
118118
// CHECK: regular user: %{{.*}} = load [copy]
@@ -121,7 +121,7 @@ sil [ossa] @testGuaranteedForwarding : $@convention(thin) (@owned D) -> () {
121121
bb0(%0 : @owned $D):
122122
%borrow0 = begin_borrow %0 : $D
123123
%c = unchecked_ref_cast %borrow0 : $D to $C
124-
specify_test "ssa-liveness @trace[0]"
124+
specify_test "ssa_liveness @trace[0]"
125125
debug_value [trace] %c : $C
126126
%d = unchecked_ref_cast %c : $C to $D
127127
%f = ref_element_addr %d : $D, #D.object
@@ -133,28 +133,28 @@ bb0(%0 : @owned $D):
133133
return %99 : $()
134134
}
135135

136-
// CHECK-LABEL: testGuaranteedResult: ssa-liveness
136+
// CHECK-LABEL: testGuaranteedResult: ssa_liveness
137137
// CHECK: SSA lifetime analysis: %0 = argument of bb0 : $D
138138
// CHECK: bb0: LiveWithin
139139
// CHECK: last user: end_apply
140140
sil [ossa] @testGuaranteedResult : $@convention(thin) (@guaranteed D) -> () {
141141
bb0(%0 : @guaranteed $D):
142-
specify_test "ssa-liveness @argument[0]"
142+
specify_test "ssa_liveness @argument[0]"
143143
%2 = class_method %0 : $D, #D.borrowed!read : (D) -> () -> (), $@yield_once @convention(method) (@guaranteed D) -> @yields @guaranteed C
144144
(%3, %4) = begin_apply %2(%0) : $@yield_once @convention(method) (@guaranteed D) -> @yields @guaranteed C
145145
end_apply %4
146146
%99 = tuple()
147147
return %99 : $()
148148
}
149149

150-
// CHECK-LABEL: testScopedAddress: ssa-liveness
150+
// CHECK-LABEL: testScopedAddress: ssa_liveness
151151
// CHECK: SSA lifetime analysis: %{{.*}} = ref_element_addr %0
152152
// CHECK: bb0: LiveWithin
153153
// CHECK: last user: end_access
154154
sil [ossa] @testScopedAddress : $@convention(thin) (@guaranteed D) -> () {
155155
bb0(%0 : @guaranteed $D):
156156
%f = ref_element_addr %0 : $D, #D.object
157-
specify_test "ssa-liveness @trace[0]"
157+
specify_test "ssa_liveness @trace[0]"
158158
debug_value [trace] %f : $*C
159159
%access = begin_access [read] [static] %f : $*C
160160
%o = load [copy] %access : $*C
@@ -164,21 +164,21 @@ bb0(%0 : @guaranteed $D):
164164
return %99 : $()
165165
}
166166

167-
// CHECK-LABEL: testDeadAddress: ssa-liveness
167+
// CHECK-LABEL: testDeadAddress: ssa_liveness
168168
// CHECK: SSA lifetime analysis: %0 = argument of bb0 : $D
169169
// CHECK: bb0: LiveWithin
170170
// CHECK: last user: %{{.*}} = ref_element_addr
171171
sil [ossa] @testDeadAddress : $@convention(thin) (@guaranteed D) -> () {
172172
bb0(%0 : @guaranteed $D):
173-
specify_test "ssa-liveness @argument[0]"
173+
specify_test "ssa_liveness @argument[0]"
174174
%f = ref_element_addr %0 : $D, #D.object
175175
%99 = tuple()
176176
return %99 : $()
177177
}
178178

179179
// A LiveOut block with a non-SSA def, bb0, has no liveness boundary.
180180
//
181-
// CHECK-LABEL: testMultiDefLiveOutNoBoundary: multidef-liveness
181+
// CHECK-LABEL: testMultiDefLiveOutNoBoundary: multidef_liveness
182182
// CHECK: MultiDef lifetime analysis:
183183
// CHECK: def value: [[CP0:%.*]] = copy_value %0 : $C
184184
// CHECK: def value: %{{.*}} = copy_value %0 : $C
@@ -197,7 +197,7 @@ bb0(%0 : @guaranteed $D):
197197
sil [ossa] @testMultiDefLiveOutNoBoundary : $@convention(thin) (@guaranteed C) -> () {
198198
bb0(%0 : @guaranteed $C):
199199
%copy0 = copy_value %0 : $C
200-
specify_test "multidef-liveness @trace[0] @trace[1] @trace[2] @trace[3]"
200+
specify_test "multidef_liveness @trace[0] @trace[1] @trace[2] @trace[3]"
201201
debug_value [trace] %copy0 : $C
202202
cond_br undef, bb1, bb3
203203

@@ -222,17 +222,17 @@ bb4(%phi : @owned $C):
222222
return %99 : $()
223223
}
224224

225-
// CHECK-LABEL: testSSADeadRefElementAddr: ssa-liveness
225+
// CHECK-LABEL: testSSADeadRefElementAddr: ssa_liveness
226226
// CHECK: SSA lifetime analysis: %0 = argument of bb0 : $C
227227
// CHECK-NEXT: bb0: LiveOut
228228
// CHECK-NEXT: bb2: LiveOut
229229
// CHECK-NEXT: bb3: LiveWithin
230230
// CHECK-NEXT: bb1: LiveOut
231231
// CHECK: ref_element_addr %6 : $D, #D.object
232-
// CHECK-NEXT-LABEL: end running test 1 of 1 on testSSADeadRefElementAddr: ssa-liveness
232+
// CHECK-NEXT-LABEL: end running test 1 of 1 on testSSADeadRefElementAddr: ssa_liveness
233233
sil [ossa] @testSSADeadRefElementAddr : $@convention(thin) (@guaranteed C) -> () {
234234
bb0(%0 : @guaranteed $C):
235-
specify_test "ssa-liveness @argument[0]"
235+
specify_test "ssa_liveness @argument[0]"
236236
cond_br undef, bb1, bb2
237237

238238
bb1:
@@ -251,14 +251,14 @@ bb3(%phi : @guaranteed $D):
251251

252252
// One of the uses is a reborrowed inner borrow scope.
253253
//
254-
// CHECK-LABEL: testSSAInnerReborrowedPhi: ssa-liveness
254+
// CHECK-LABEL: testSSAInnerReborrowedPhi: ssa_liveness
255255
// CHECK: SSA lifetime analysis: %0 = argument of bb0 : $C
256256
// CHECK-NEXT: Incomplete liveness: Reborrowed inner scope
257257
// CHECK-NEXT: bb0: LiveWithin
258258
// CHECK-NEXT: dead def: %0 = argument of bb0 : $C
259259
sil [ossa] @testSSAInnerReborrowedPhi : $@convention(thin) (@guaranteed C) -> () {
260260
bb0(%0 : @guaranteed $C):
261-
specify_test "ssa-liveness @argument[0]"
261+
specify_test "ssa_liveness @argument[0]"
262262
%borrow0 = begin_borrow %0 : $C
263263
%aggregate = struct $PairC(%borrow0 : $C, %borrow0 : $C)
264264
br bb1(%borrow0 : $C, %aggregate : $PairC)
@@ -280,7 +280,7 @@ bb1(%reborrow : @guaranteed $C, %phi : @guaranteed $PairC):
280280
// by default. Only the client can tell that a particular guaranteed phi
281281
// should actually extend liveness if it has no uses.
282282
//
283-
// CHECK-LABEL: testSSADeadGuaranteedPhi: ssa-liveness
283+
// CHECK-LABEL: testSSADeadGuaranteedPhi: ssa_liveness
284284
// CHECK: SSA lifetime analysis: %0 = argument of bb0 : $C
285285
// CHECK-NEXT: bb0: LiveOut
286286
// CHECK-NEXT: bb2: LiveWithin
@@ -292,7 +292,7 @@ bb1(%reborrow : @guaranteed $C, %phi : @guaranteed $PairC):
292292
// CHECK-NEXT: end running
293293
sil [ossa] @testSSADeadGuaranteedPhi : $@convention(thin) (@guaranteed C) -> () {
294294
bb0(%0 : @guaranteed $C):
295-
specify_test "ssa-liveness @argument[0]"
295+
specify_test "ssa_liveness @argument[0]"
296296
cond_br undef, bb1, bb2
297297

298298
bb1:
@@ -310,7 +310,7 @@ bb3(%deadPhi : @guaranteed $D):
310310

311311
// The phi is part of the guaranteed argument's simple live range.
312312
//
313-
// CHECK-LABEL: testSSADominatedPhi: ssa-liveness
313+
// CHECK-LABEL: testSSADominatedPhi: ssa_liveness
314314
// CHECK: SSA lifetime analysis: %0 = argument of bb0 : $C
315315
// CHECK-NEXT: bb0: LiveOut
316316
// CHECK-NEXT: bb2: LiveOut
@@ -325,7 +325,7 @@ bb3(%deadPhi : @guaranteed $D):
325325
// CHECK-NEXT: end running
326326
sil [ossa] @testSSADominatedPhi : $@convention(thin) (@guaranteed C) -> () {
327327
bb0(%0 : @guaranteed $C):
328-
specify_test "ssa-liveness @argument[0]"
328+
specify_test "ssa_liveness @argument[0]"
329329
cond_br undef, bb1, bb2
330330

331331
bb1:
@@ -346,15 +346,15 @@ bb3(%phi : @guaranteed $D):
346346

347347
// The phi is part of the guaranteed argument's simple live range.
348348
//
349-
// CHECK-LABEL: testSSAPartialDominatedPhi: ssa-liveness
349+
// CHECK-LABEL: testSSAPartialDominatedPhi: ssa_liveness
350350
// CHECK: SSA lifetime analysis: %0 = argument of bb0 : $C
351351
// CHECK-NEXT: bb0: LiveOut
352352
// CHECK-NEXT: bb1: LiveWithin
353353
// CHECK: last user:
354354
// CHECK-SAME: load
355355
sil [ossa] @testSSAPartialDominatedPhi : $@convention(thin) (@guaranteed C, @guaranteed C) -> () {
356356
bb0(%0 : @guaranteed $C, %1 : @guaranteed $C):
357-
specify_test "ssa-liveness @argument[0]"
357+
specify_test "ssa_liveness @argument[0]"
358358
%borrow1 = begin_borrow %1 : $C
359359
%aggregate = struct $PairC(%0 : $C, %borrow1 : $C)
360360
br bb1(%borrow1 : $C, %aggregate : $PairC)
@@ -373,7 +373,7 @@ bb1(%reborrow : @guaranteed $C, %phi : @guaranteed $PairC):
373373
// The phi is protected by an outer adjacent reborrow. It is not part
374374
// of the guaranteed argument's simple live range.
375375
//
376-
// CHECK-LABEL: testSSAReborrowedPhi: ssa-liveness
376+
// CHECK-LABEL: testSSAReborrowedPhi: ssa_liveness
377377
// CHECK: SSA lifetime analysis: %{{.*}} = begin_borrow
378378
// CHECK-NEXT: bb0: LiveWithin
379379
// CHECK-NEXT: regular user: br bb1
@@ -383,7 +383,7 @@ bb1(%reborrow : @guaranteed $C, %phi : @guaranteed $PairC):
383383
sil [ossa] @testSSAReborrowedPhi : $@convention(thin) (@guaranteed C) -> () {
384384
bb0(%0 : @guaranteed $C):
385385
%borrow = begin_borrow %0 : $C
386-
specify_test "ssa-liveness @trace[0]"
386+
specify_test "ssa_liveness @trace[0]"
387387
debug_value [trace] %borrow : $C
388388
%aggregate = struct $PairC(%borrow : $C, %borrow : $C)
389389
br bb1(%borrow : $C, %aggregate : $PairC)
@@ -403,7 +403,7 @@ bb1(%reborrow : @guaranteed $C, %phi : @guaranteed $PairC):
403403
//
404404
sil [ossa] @testSSALongForwardingChain : $@convention(thin) (@guaranteed C) -> () {
405405
bb0(%0 : @guaranteed $C):
406-
specify_test "ssa-liveness @argument[0]"
406+
specify_test "ssa_liveness @argument[0]"
407407
%s0 = struct $PairC(%0 : $C, %0 : $C)
408408
%s0a = struct_extract %s0 : $PairC, #PairC.first
409409
%s0b = struct_extract %s0 : $PairC, #PairC.second
@@ -514,7 +514,7 @@ bb0(%0: @owned $C):
514514
%1 = alloc_stack $C
515515
%2 = copy_value %0 : $C
516516
specify_test """
517-
multidefuse-liveness defs: @instruction @block[1].instruction[2]
517+
multidefuse_liveness defs: @instruction @block[1].instruction[2]
518518
uses: @block[1].instruction[0]
519519
"""
520520
store %2 to [init] %1 : $*C

0 commit comments

Comments
 (0)