Skip to content

Commit 1fbc526

Browse files
committed
[Test] Underscored find_borrow_introducers.
Use underscores rather than hyphens so that text editors understand the name as a single word.
1 parent a392214 commit 1fbc526

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

lib/SIL/Utils/OwnershipUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2169,7 +2169,7 @@ namespace swift::test {
21692169
// - function
21702170
// - the borrow introducers
21712171
static FunctionTest FindBorrowIntroducers(
2172-
"find-borrow-introducers", [](auto &function, auto &arguments, auto &test) {
2172+
"find_borrow_introducers", [](auto &function, auto &arguments, auto &test) {
21732173
function.print(llvm::outs());
21742174
llvm::outs() << "Introducers:\n";
21752175
visitBorrowIntroducers(arguments.takeValue(), [](SILValue def) {

test/SILOptimizer/borrow_introducer_unit.sil

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -30,47 +30,47 @@ sil @coro : $@yield_once @convention(thin) () -> @yields @guaranteed C
3030

3131
// The introducer of an introducer is always itself.
3232

33-
// CHECK-LABEL: introducer_identity: find-borrow-introducers with: %0
33+
// CHECK-LABEL: introducer_identity: find_borrow_introducers with: %0
3434
// CHECK: } // end sil function 'introducer_identity'
3535
// CHECK: Introducers:
3636
// CHECK-NEXT: %0 = argument of bb0 : $C
37-
// CHECK-NEXT: introducer_identity: find-borrow-introducers with: %0
37+
// CHECK-NEXT: introducer_identity: find_borrow_introducers with: %0
3838

3939
// CHECK-LABEL: introducer_identity: borrow_introducers with: %0
4040
// CHECK: } // end sil function 'introducer_identity'
4141
// CHECK: Borrow introducers for: %0 = argument of bb0 : $C
4242
// CHECK-NEXT: %0 = argument of bb0 : $C
4343
// CHECK-NEXT: introducer_identity: borrow_introducers with: %0
4444

45-
// CHECK-LABEL: introducer_identity: find-borrow-introducers with: %borrow1
45+
// CHECK-LABEL: introducer_identity: find_borrow_introducers with: %borrow1
4646
// CHECK: } // end sil function 'introducer_identity'
4747
// CHECK: Introducers:
4848
// CHECK-NEXT: begin_borrow %0 : $C
49-
// CHECK-NEXT: introducer_identity: find-borrow-introducers with: %borrow1
49+
// CHECK-NEXT: introducer_identity: find_borrow_introducers with: %borrow1
5050

5151
// CHECK-LABEL: introducer_identity: borrow_introducers with: %borrow1
5252
// CHECK: } // end sil function 'introducer_identity'
5353
// CHECK: Borrow introducers for: %{{.*}} = begin_borrow %0 : $C
5454
// CHECK-NEXT: begin_borrow %0 : $C
5555
// CHECK-NEXT: introducer_identity: borrow_introducers with: %borrow1
5656

57-
// CHECK-LABEL: introducer_identity: find-borrow-introducers with: %borrow2
57+
// CHECK-LABEL: introducer_identity: find_borrow_introducers with: %borrow2
5858
// CHECK: } // end sil function 'introducer_identity'
5959
// CHECK: Introducers:
6060
// CHECK-NEXT: load_borrow %1 : $*C
61-
// CHECK-NEXT: introducer_identity: find-borrow-introducers with: %borrow2
61+
// CHECK-NEXT: introducer_identity: find_borrow_introducers with: %borrow2
6262

6363
// CHECK-LABEL: introducer_identity: borrow_introducers with: %borrow2
6464
// CHECK: } // end sil function 'introducer_identity'
6565
// CHECK: Borrow introducers for: {{.*}} = load_borrow %1 : $*C
6666
// CHECK-NEXT: load_borrow %1 : $*C
6767
// CHECK-NEXT: introducer_identity: borrow_introducers with: %borrow2
6868

69-
// CHECK-LABEL: introducer_identity: find-borrow-introducers with: %reborrow
69+
// CHECK-LABEL: introducer_identity: find_borrow_introducers with: %reborrow
7070
// CHECK: } // end sil function 'introducer_identity'
7171
// CHECK: Introducers:
7272
// CHECK-NEXT: argument of bb1 : $C
73-
// CHECK-NEXT: introducer_identity: find-borrow-introducers with: %reborrow
73+
// CHECK-NEXT: introducer_identity: find_borrow_introducers with: %reborrow
7474

7575
// CHECK-LABEL: introducer_identity: borrow_introducers with: %reborrow
7676
// CHECK: } // end sil function 'introducer_identity'
@@ -79,21 +79,21 @@ sil @coro : $@yield_once @convention(thin) () -> @yields @guaranteed C
7979
// CHECK-NEXT: introducer_identity: borrow_introducers with: %reborrow
8080
sil [ossa] @introducer_identity : $@convention(thin) (@guaranteed C, @in C) -> () {
8181
entry(%0 : @guaranteed $C, %1 : $*C):
82-
specify_test "find-borrow-introducers %0"
82+
specify_test "find_borrow_introducers %0"
8383
specify_test "borrow_introducers %0"
8484
%borrow1 = begin_borrow %0 : $C
85-
specify_test "find-borrow-introducers %borrow1"
85+
specify_test "find_borrow_introducers %borrow1"
8686
specify_test "borrow_introducers %borrow1"
8787

8888
%borrow2 = load_borrow %1 : $*C
89-
specify_test "find-borrow-introducers %borrow2"
89+
specify_test "find_borrow_introducers %borrow2"
9090
specify_test "borrow_introducers %borrow2"
9191
end_borrow %borrow2 : $C
9292

9393
br exit(%borrow1 : $C)
9494

9595
exit(%reborrow : @guaranteed $C):
96-
specify_test "find-borrow-introducers %reborrow"
96+
specify_test "find_borrow_introducers %reborrow"
9797
specify_test "borrow_introducers %reborrow"
9898
end_borrow %reborrow : $C
9999
destroy_addr %1 : $*C
@@ -104,10 +104,10 @@ exit(%reborrow : @guaranteed $C):
104104
// There is no introducer if the guaranteed value is produced from a
105105
// trivial value.
106106

107-
// CHECK-LABEL: introducer_trivial: find-borrow-introducers with: %phi
107+
// CHECK-LABEL: introducer_trivial: find_borrow_introducers with: %phi
108108
// CHECK: } // end sil function 'introducer_trivial'
109109
// CHECK: Introducers:
110-
// CHECK-NEXT: introducer_trivial: find-borrow-introducers with: %phi
110+
// CHECK-NEXT: introducer_trivial: find_borrow_introducers with: %phi
111111

112112
// CHECK-LABEL: introducer_trivial: borrow_introducers with: %phi
113113
// CHECK: } // end sil function 'introducer_trivial'
@@ -120,7 +120,7 @@ entry:
120120
br none(%trivial : $FakeOptional<C>)
121121

122122
none(%phi : @guaranteed $FakeOptional<C>):
123-
specify_test "find-borrow-introducers %phi"
123+
specify_test "find_borrow_introducers %phi"
124124
specify_test "borrow_introducers %phi"
125125
%retval = tuple ()
126126
return %retval : $()
@@ -131,11 +131,11 @@ none(%phi : @guaranteed $FakeOptional<C>):
131131
// TODO: When we have a reborrow flag, an unreachable phi can be
132132
// either a reborrow or forwarded, as long as it has no end_borrow.
133133

134-
// CHECK-LABEL: introducer_unreachable: find-borrow-introducers with: %phiCycle
134+
// CHECK-LABEL: introducer_unreachable: find_borrow_introducers with: %phiCycle
135135
// CHECK: } // end sil function 'introducer_unreachable'
136136
// CHECK: Introducers:
137137
// CHECK-NEXT: argument of bb1 : $C
138-
// CHECK-NEXT: introducer_unreachable: find-borrow-introducers with: %phiCycle
138+
// CHECK-NEXT: introducer_unreachable: find_borrow_introducers with: %phiCycle
139139

140140
// CHECK-LABEL: introducer_unreachable: borrow_introducers with: %phiCycle
141141
// CHECK: } // end sil function 'introducer_unreachable'
@@ -147,7 +147,7 @@ entry:
147147
br exit
148148

149149
unreachable_loop(%phiCycle : @guaranteed $C):
150-
specify_test "find-borrow-introducers %phiCycle"
150+
specify_test "find_borrow_introducers %phiCycle"
151151
specify_test "borrow_introducers %phiCycle"
152152
br unreachable_loop(%phiCycle : $C)
153153

@@ -159,11 +159,11 @@ exit:
159159
// All data flow paths through phis and aggregates originate from the
160160
// same function argument.
161161

162-
// CHECK-LABEL: introducer_single: find-borrow-introducers with: %aggregate2
162+
// CHECK-LABEL: introducer_single: find_borrow_introducers with: %aggregate2
163163
// CHECK: } // end sil function 'introducer_single'
164164
// CHECK: Introducers:
165165
// CHECK-NEXT: %0 = argument of bb0 : $C
166-
// CHECK-NEXT: introducer_single: find-borrow-introducers with: %aggregate2
166+
// CHECK-NEXT: introducer_single: find_borrow_introducers with: %aggregate2
167167

168168
// CHECK-LABEL: introducer_single: borrow_introducers with: %aggregate2
169169
// CHECK: } // end sil function 'introducer_single'
@@ -185,7 +185,7 @@ bb1(%payload : @guaranteed $D):
185185
%first = struct_extract %aggregate : $PairC, #PairC.first
186186
%second = struct_extract %aggregate : $PairC, #PairC.second
187187
%aggregate2 = struct $PairC(%first : $C, %second : $C)
188-
specify_test "find-borrow-introducers %aggregate2"
188+
specify_test "find_borrow_introducers %aggregate2"
189189
specify_test "borrow_introducers %aggregate2"
190190
br exit
191191

@@ -205,13 +205,13 @@ exit:
205205
// %reborrow. Therefore, %reborrow is an introducer from separate phi
206206
// paths, but should only appear in the introducer list once.
207207
//
208-
// CHECK-LABEL: introducer_revisit_reborrow: find-borrow-introducers with: %aggregate2
208+
// CHECK-LABEL: introducer_revisit_reborrow: find_borrow_introducers with: %aggregate2
209209
// CHECK: bb1([[REBORROW:%.*]] : @reborrow @guaranteed $C
210210
// CHECK: } // end sil function 'introducer_revisit_reborrow'
211211
// CHECK: Introducers:
212212
// CHECK-NEXT: [[REBORROW]] = argument of bb1 : $C
213213
// CHECK-NEXT: %0 = argument of bb0 : $C
214-
// CHECK-NEXT: introducer_revisit_reborrow: find-borrow-introducers with: %aggregate2
214+
// CHECK-NEXT: introducer_revisit_reborrow: find_borrow_introducers with: %aggregate2
215215

216216
// CHECK-LABEL: introducer_revisit_reborrow: borrow_introducers with: %aggregate2
217217
// CHECK: bb1([[REBORROW:%.*]] : @reborrow @guaranteed $C
@@ -229,7 +229,7 @@ entry(%0 : @guaranteed $C):
229229
bb2(%reborrow : @guaranteed $C, %phi : @guaranteed $PairC):
230230
%first = struct_extract %phi : $PairC, #PairC.first
231231
%aggregate2 = struct $PairC(%reborrow : $C, %first : $C)
232-
specify_test "find-borrow-introducers %aggregate2"
232+
specify_test "find_borrow_introducers %aggregate2"
233233
specify_test "borrow_introducers %aggregate2"
234234
br exit
235235

@@ -242,7 +242,7 @@ exit:
242242
// %phi originates from %0, %borrow1, & %borrow2. %borrow1 is, however,
243243
// reborrowed in bb2.
244244

245-
// CHECK-LABEL: introducer_multiple_borrow: find-borrow-introducers with: %aggregate2
245+
// CHECK-LABEL: introducer_multiple_borrow: find_borrow_introducers with: %aggregate2
246246
// CHECK: begin_borrow %0 : $C
247247
// CHECK: [[BORROW2:%.*]] = begin_borrow %0 : $C
248248
// CHECK: bb1([[REBORROW:%.*]] : @reborrow @guaranteed $C
@@ -251,7 +251,7 @@ exit:
251251
// CHECK-NEXT: [[REBORROW]] = argument of bb1 : $C
252252
// CHECK-NEXT: %0 = argument of bb0 : $C
253253
// CHECK-NEXT: [[BORROW2]] = begin_borrow %0 : $C
254-
// CHECK-NEXT: introducer_multiple_borrow: find-borrow-introducers with: %aggregate2
254+
// CHECK-NEXT: introducer_multiple_borrow: find_borrow_introducers with: %aggregate2
255255

256256
// CHECK-LABEL: introducer_multiple_borrow: borrow_introducers with: %aggregate2
257257
// CHECK: begin_borrow %0 : $C
@@ -273,7 +273,7 @@ entry(%0 : @guaranteed $C):
273273
bb2(%reborrow : @guaranteed $C, %phi : @guaranteed $PairC):
274274
%first = struct_extract %phi : $PairC, #PairC.first
275275
%aggregate2 = struct $PairC(%reborrow : $C, %first : $C)
276-
specify_test "find-borrow-introducers %aggregate2"
276+
specify_test "find_borrow_introducers %aggregate2"
277277
specify_test "borrow_introducers %aggregate2"
278278
br exit
279279

@@ -284,36 +284,36 @@ exit:
284284
return %retval : $()
285285
}
286286

287-
// CHECK-LABEL: introducer_dependence: find-borrow-introducers with: %dependent
287+
// CHECK-LABEL: introducer_dependence: find_borrow_introducers with: %dependent
288288
// CHECK: Introducers:
289289
// CHECK: %0 = argument of bb0 : $C
290-
// CHECK-LABEL: introducer_dependence: find-borrow-introducers with: %dependent
290+
// CHECK-LABEL: introducer_dependence: find_borrow_introducers with: %dependent
291291

292292
// CHECK-LABEL: introducer_dependence: borrow_introducers with: %dependent
293293
// CHECK: Borrow introducers for: %{{.*}} = mark_dependence %0 : $C on %1 : $Builtin.NativeObject
294294
// CHECK: %0 = argument of bb0 : $C
295295
// CHECK-NEXT: introducer_dependence: borrow_introducers with: %dependent
296296
sil [ossa] @introducer_dependence : $@convention(thin) (@guaranteed C, @guaranteed Builtin.NativeObject) -> () {
297297
entry(%0 : @guaranteed $C, %1 : @guaranteed $Builtin.NativeObject):
298-
specify_test "find-borrow-introducers %dependent"
298+
specify_test "find_borrow_introducers %dependent"
299299
specify_test "borrow_introducers %dependent"
300300
%dependent = mark_dependence %0 : $C on %1 : $Builtin.NativeObject
301301
%retval = tuple ()
302302
return %retval : $()
303303
}
304304

305-
// CHECK-LABEL: introducer_bridge: find-borrow-introducers with: %bridge
305+
// CHECK-LABEL: introducer_bridge: find_borrow_introducers with: %bridge
306306
// CHECK: Introducers:
307307
// CHECK: %0 = argument of bb0 : $C
308-
// CHECK-LABEL: introducer_bridge: find-borrow-introducers with: %bridge
308+
// CHECK-LABEL: introducer_bridge: find_borrow_introducers with: %bridge
309309

310310
// CHECK-LABEL: introducer_bridge: borrow_introducers with: %bridge
311311
// CHECK: Borrow introducers for: %{{.*}} = ref_to_bridge_object %0 : $C, %1 : $Builtin.Word
312312
// CHECK: %0 = argument of bb0 : $C
313313
// CHECK-NEXT: introducer_bridge: borrow_introducers with: %bridge
314314
sil [ossa] @introducer_bridge : $@convention(thin) (@guaranteed C, Builtin.Word) -> () {
315315
entry(%0 : @guaranteed $C, %1 : $Builtin.Word):
316-
specify_test "find-borrow-introducers %bridge"
316+
specify_test "find_borrow_introducers %bridge"
317317
specify_test "borrow_introducers %bridge"
318318
%bridge = ref_to_bridge_object %0 : $C, %1 : $Builtin.Word
319319
%retval = tuple ()

0 commit comments

Comments
 (0)