Skip to content

Commit a392214

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

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

lib/SIL/Utils/OwnershipUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2144,7 +2144,7 @@ namespace swift::test {
21442144
// - function
21452145
// - the enclosing defs
21462146
static FunctionTest FindEnclosingDefsTest(
2147-
"find-enclosing-defs", [](auto &function, auto &arguments, auto &test) {
2147+
"find_enclosing_defs", [](auto &function, auto &arguments, auto &test) {
21482148
function.print(llvm::outs());
21492149
llvm::outs() << "Enclosing Defs:\n";
21502150
visitEnclosingDefs(arguments.takeValue(), [](SILValue def) {

test/SILOptimizer/enclosing_def_unit.sil

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,31 @@ class D : C {}
2828

2929
// These introducers have no enclosing def.
3030

31-
// CHECK-LABEL: enclosing_def_empty: find-enclosing-defs with: %0
31+
// CHECK-LABEL: enclosing_def_empty: find_enclosing_defs with: %0
3232
// CHECK: } // end sil function 'enclosing_def_empty'
3333
// CHECK: Enclosing Defs:
34-
// CHECK-NEXT: enclosing_def_empty: find-enclosing-defs with: %0
34+
// CHECK-NEXT: enclosing_def_empty: find_enclosing_defs with: %0
3535

3636
// CHECK-LABEL: enclosing_def_empty: enclosing_values with: %0
3737
// CHECK: } // end sil function 'enclosing_def_empty'
3838
// CHECK: Enclosing values for: %0 = argument of bb0 : $C
3939
// CHECK-NEXT: enclosing_def_empty: enclosing_values with: %0
4040

41-
// CHECK-LABEL: enclosing_def_empty: find-enclosing-defs with: %borrow1
41+
// CHECK-LABEL: enclosing_def_empty: find_enclosing_defs with: %borrow1
4242
// CHECK: } // end sil function 'enclosing_def_empty'
4343
// CHECK: Enclosing Defs:
44-
// CHECK-NEXT: enclosing_def_empty: find-enclosing-defs with: %borrow1
44+
// CHECK-NEXT: enclosing_def_empty: find_enclosing_defs with: %borrow1
4545

4646
// CHECK-LABEL: enclosing_def_empty: enclosing_values with: %borrow1
4747
// CHECK: } // end sil function 'enclosing_def_empty'
4848
// CHECK: Enclosing values for: %{{.*}} = load_borrow %1 : $*C
4949
// CHECK-NEXT: enclosing_def_empty: enclosing_values with: %borrow1
5050
sil [ossa] @enclosing_def_empty : $@convention(thin) (@guaranteed C, @in C) -> () {
5151
entry(%0 : @guaranteed $C, %1 : $*C):
52-
specify_test "find-enclosing-defs %0"
52+
specify_test "find_enclosing_defs %0"
5353
specify_test "enclosing_values %0"
5454
%borrow1 = load_borrow %1 : $*C
55-
specify_test "find-enclosing-defs %borrow1"
55+
specify_test "find_enclosing_defs %borrow1"
5656
specify_test "enclosing_values %borrow1"
5757
end_borrow %borrow1 : $C
5858
destroy_addr %1 : $*C
@@ -63,10 +63,10 @@ entry(%0 : @guaranteed $C, %1 : $*C):
6363
// There is no introducer if the guaranteed value is produced from a
6464
// trivial value.
6565

66-
// CHECK-LABEL: enclosing_def_trivial: find-enclosing-defs with: %phi
66+
// CHECK-LABEL: enclosing_def_trivial: find_enclosing_defs with: %phi
6767
// CHECK: } // end sil function 'enclosing_def_trivial'
6868
// CHECK: Enclosing Defs:
69-
// CHECK-NEXT: enclosing_def_trivial: find-enclosing-defs with: %phi
69+
// CHECK-NEXT: enclosing_def_trivial: find_enclosing_defs with: %phi
7070

7171
// CHECK-LABEL: enclosing_def_trivial: enclosing_values with: %phi
7272
// CHECK: } // end sil function 'enclosing_def_trivial'
@@ -78,7 +78,7 @@ entry:
7878
br none(%trivial : $FakeOptional<C>)
7979

8080
none(%phi : @guaranteed $FakeOptional<C>):
81-
specify_test "find-enclosing-defs %phi"
81+
specify_test "find_enclosing_defs %phi"
8282
specify_test "enclosing_values %phi"
8383
%retval = tuple ()
8484
return %retval : $()
@@ -87,10 +87,10 @@ none(%phi : @guaranteed $FakeOptional<C>):
8787
// There is an introducer but no enclosing def if the guaranteed value
8888
// is produced from a an unreachable loop.
8989

90-
// CHECK-LABEL: enclosing_def_unreachable: find-enclosing-defs with: %phiCycle
90+
// CHECK-LABEL: enclosing_def_unreachable: find_enclosing_defs with: %phiCycle
9191
// CHECK: } // end sil function 'enclosing_def_unreachable'
9292
// CHECK: Enclosing Defs:
93-
// CHECK-NEXT: enclosing_def_unreachable: find-enclosing-defs with: %phiCycle
93+
// CHECK-NEXT: enclosing_def_unreachable: find_enclosing_defs with: %phiCycle
9494

9595
// CHECK-LABEL: enclosing_def_unreachable: enclosing_values with: %phiCycle
9696
// CHECK: } // end sil function 'enclosing_def_unreachable'
@@ -101,7 +101,7 @@ entry:
101101
br exit
102102

103103
unreachable_loop(%phiCycle : @guaranteed $C):
104-
specify_test "find-enclosing-defs %phiCycle"
104+
specify_test "find_enclosing_defs %phiCycle"
105105
specify_test "enclosing_values %phiCycle"
106106
br unreachable_loop(%phiCycle : $C)
107107

@@ -113,11 +113,11 @@ exit:
113113
// All data flow paths through phis and aggregates originate from the
114114
// same borrow scope. This is the same as finding the introducer.
115115

116-
// CHECK-LABEL: enclosing_def_single_introducer: find-enclosing-defs with: %aggregate2
116+
// CHECK-LABEL: enclosing_def_single_introducer: find_enclosing_defs with: %aggregate2
117117
// CHECK: sil [ossa] @enclosing_def_single_introducer
118118
// CHECK: Enclosing Defs:
119119
// CHECK: begin_borrow %0 : $C
120-
// CHECK-NEXT: enclosing_def_single_introducer: find-enclosing-defs with: %aggregate2
120+
// CHECK-NEXT: enclosing_def_single_introducer: find_enclosing_defs with: %aggregate2
121121

122122
// CHECK-LABEL: enclosing_def_single_introducer: enclosing_values with: %aggregate2
123123
// CHECK: sil [ossa] @enclosing_def_single_introducer
@@ -140,7 +140,7 @@ bb1(%payload : @guaranteed $D):
140140
%first = struct_extract %aggregate : $PairC, #PairC.first
141141
%second = struct_extract %aggregate : $PairC, #PairC.second
142142
%aggregate2 = struct $PairC(%first : $C, %second : $C)
143-
specify_test "find-enclosing-defs %aggregate2"
143+
specify_test "find_enclosing_defs %aggregate2"
144144
specify_test "enclosing_values %aggregate2"
145145
br exit
146146

@@ -155,11 +155,11 @@ exit:
155155

156156
// All reborrows original from the same dominating borrow scope.
157157

158-
// CHECK: enclosing_def_single_outer: find-enclosing-defs with: %reborrow3
158+
// CHECK: enclosing_def_single_outer: find_enclosing_defs with: %reborrow3
159159
// CHECK: } // end sil function 'enclosing_def_single_outer'
160160
// CHECK: Enclosing Defs:
161161
// CHECK-NEXT: %0 = argument of bb0 : $C
162-
// CHECK-NEXT: enclosing_def_single_outer: find-enclosing-defs with: %reborrow3
162+
// CHECK-NEXT: enclosing_def_single_outer: find_enclosing_defs with: %reborrow3
163163

164164
// CHECK: enclosing_def_single_outer: enclosing_values with: %reborrow3
165165
// CHECK: } // end sil function 'enclosing_def_single_outer'
@@ -176,7 +176,7 @@ bb2(%reborrow2 : @guaranteed $C):
176176
br bb3(%reborrow2 : $C)
177177

178178
bb3(%reborrow3 : @guaranteed $C):
179-
specify_test "find-enclosing-defs %reborrow3"
179+
specify_test "find_enclosing_defs %reborrow3"
180180
specify_test "enclosing_values %reborrow3"
181181
end_borrow %reborrow3 : $C
182182
%retval = tuple ()
@@ -185,13 +185,13 @@ bb3(%reborrow3 : @guaranteed $C):
185185

186186
// Find the outer enclosingreborrow.
187187

188-
// CHECK-LABEL: enclosing_def_reborrow: find-enclosing-defs with: %reborrow_inner3
188+
// CHECK-LABEL: enclosing_def_reborrow: find_enclosing_defs with: %reborrow_inner3
189189
// CHECK: sil [ossa] @enclosing_def_reborrow : $@convention(thin) (@guaranteed C) -> () {
190190
// CHECK: bb1([[REBORROW:%.*]] : @reborrow @guaranteed $C, %{{.*}} : @reborrow @guaranteed $C):
191191
// CHECK: } // end sil function 'enclosing_def_reborrow'
192192
// CHECK: Enclosing Defs:
193193
// CHECK-NEXT: [[REBORROW]] = argument of bb1 : $C
194-
// CHECK-NEXT: enclosing_def_reborrow: find-enclosing-defs with: %reborrow_inner3
194+
// CHECK-NEXT: enclosing_def_reborrow: find_enclosing_defs with: %reborrow_inner3
195195

196196
// CHECK-LABEL: enclosing_def_reborrow: enclosing_values with: %reborrow_inner3
197197
// CHECK: sil [ossa] @enclosing_def_reborrow : $@convention(thin) (@guaranteed C) -> () {
@@ -210,7 +210,7 @@ bb2(%reborrow_outer : @guaranteed $C, %reborrow_inner : @guaranteed $C):
210210
br bb3(%reborrow_inner : $C)
211211

212212
bb3(%reborrow_inner3 : @guaranteed $C):
213-
specify_test "find-enclosing-defs %reborrow_inner3"
213+
specify_test "find_enclosing_defs %reborrow_inner3"
214214
specify_test "enclosing_values %reborrow_inner3"
215215
end_borrow %reborrow_inner3 : $C
216216
end_borrow %reborrow_outer : $C
@@ -220,13 +220,13 @@ bb3(%reborrow_inner3 : @guaranteed $C):
220220

221221
// The enclosing def of a forwarding phi cycle is the reborrow phi cycle.
222222

223-
// CHECK-LABEL: enclosing_def_cycle: find-enclosing-defs with: %forward
223+
// CHECK-LABEL: enclosing_def_cycle: find_enclosing_defs with: %forward
224224
// CHECK: sil [ossa] @enclosing_def_cycle : $@convention(thin) (@guaranteed C) -> () {
225225
// CHECK: bb1([[REBORROW:%.*]] : @reborrow @guaranteed $C,
226226
// CHECK: } // end sil function 'enclosing_def_cycle'
227227
// CHECK: Enclosing Defs:
228228
// CHECK-NEXT: [[REBORROW]] = argument of bb1 : $C
229-
// CHECK-NEXT: enclosing_def_cycle: find-enclosing-defs with: %forward
229+
// CHECK-NEXT: enclosing_def_cycle: find_enclosing_defs with: %forward
230230

231231
// CHECK-LABEL: enclosing_def_cycle: enclosing_values with: %forward
232232
// CHECK: sil [ossa] @enclosing_def_cycle : $@convention(thin) (@guaranteed C) -> () {
@@ -243,7 +243,7 @@ entry(%0 : @guaranteed $C):
243243
br bb2(%borrow : $C, %first1 : $C)
244244

245245
bb2(%reborrow_outer : @guaranteed $C, %forward : @guaranteed $C):
246-
specify_test "find-enclosing-defs %forward"
246+
specify_test "find_enclosing_defs %forward"
247247
specify_test "enclosing_values %forward"
248248
%aggregate2 = struct $PairC(%reborrow_outer : $C, %forward : $C)
249249
%first2 = struct_extract %aggregate2 : $PairC, #PairC.first

0 commit comments

Comments
 (0)