Skip to content

Commit 44bffe3

Browse files
committed
Update tests for local variable reachability for debug output
1 parent 285a6ce commit 44bffe3

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

test/SILOptimizer/lifetime_dependence/lifetime_dependence_util.sil

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ entry(%0 : @owned $C, %1 : @owned $D, %2 : @guaranteed $D, %3 : $*D, %4 : $*D):
212212
// CHECK-LABEL: dependence_access: lifetime_dependence_use with: %0
213213
// CHECK: LifetimeDependence uses of: %0 = argument of bb0 : $*NE
214214
// CHECK-NEXT: Leaf use: operand #0 of end_access %{{.*}} : $*NE
215+
// CHECK-NEXT: Returned inout: %0 = argument of bb0 : $*NE
215216
// CHECK-NEXT: dependence_access: lifetime_dependence_use with: %0
216217
sil [ossa] @dependence_access : $@convention(thin) (@inout NE, @owned C) -> () {
217218
bb0(%0 : $*NE, %1 : @owned $C):

test/SILOptimizer/lifetime_dependence/local_var_util.sil

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ sil @makeDepNE : $@convention(thin) (@inout NE) -> @lifetime(borrow address_for_
1818
// CHECK-LABEL: testNEInitNoEscape: local_variable_reachable_uses with: %1, @instruction
1919
// CHECK: ### Access map:
2020
// CHECK-NEXT: Access map for: %{{.*}} = alloc_box ${ var NE }, var, name "self"
21-
// CHECK-NEXT: assign: true, store destroy_value %{{.*}} : ${ var NE }
22-
// CHECK-NEXT: assign: false, escape %{{.*}} = address_to_pointer %{{.*}} : $*NE to $Builtin.RawPointer
23-
// CHECK-NEXT: assign: true, beginAccess %{{.*}} = begin_access [modify] [unknown] %{{.*}} : $*NE
24-
// CHECK-NEXT: assign: false, load %{{.*}} = load [copy] %{{.*}} : $*NE
25-
// CHECK-NEXT: assign: true, beginAccess %{{.*}} = begin_access [modify] [unknown] %{{.*}} : $*NE
21+
// CHECK-NEXT: assign: value, hasEscaped: unknown, store, destroy_value %{{.*}} : ${ var NE }
22+
// CHECK-NEXT: assign: no, hasEscaped: true, escape, %{{.*}} = address_to_pointer %{{.*}} : $*NE to $Builtin.RawPointer
23+
// CHECK-NEXT: assign: value, hasEscaped: unknown, beginAccess, %{{.*}} = begin_access [modify] [unknown] %{{.*}} : $*NE
24+
// CHECK-NEXT: assign: no, hasEscaped: unknown, load, %{{.*}} = load [copy] %{{.*}} : $*NE
25+
// CHECK-NEXT: assign: value, hasEscaped: unknown, beginAccess, %{{.*}} = begin_access [modify] [unknown] %{{.*}} : $*NE
2626
// CHECK-NEXT: ### Modify: %{{.*}} = begin_access [modify] [unknown] %4 : $*NE
2727
// CHECK-NEXT: ### Reachable access:
28-
// CHECK-NEXT: load %{{.*}} = load [copy] %{{.*}} : $*NE
28+
// CHECK-NEXT: load, %{{.*}} = load [copy] %{{.*}} : $*NE
2929
// CHECK-NEXT: testNEInitNoEscape: local_variable_reachable_uses with: %1, @instruction
3030

3131
// CHECK-LABEL: testNEInitNoEscape: local_variable_reaching_assignments with: %1, @instruction
3232
// CHECK: ### Instruction: end_access %{{.*}} : $*NE
3333
// CHECK-NEXT: ### Reachable assignments:
34-
// CHECK-NEXT: beginAccess %21 = begin_access [modify] [unknown] %4 : $*NE
34+
// CHECK-NEXT: beginAccess, %21 = begin_access [modify] [unknown] %4 : $*NE
3535
// CHECK-NEXT: testNEInitNoEscape: local_variable_reaching_assignments with: %1, @instruction
3636
sil [ossa] @testNEInitNoEscape : $@convention(thin) (@inout NE) -> @lifetime(borrow 0) @owned NE {
3737
bb0(%0 : $*NE):
@@ -86,10 +86,10 @@ bb3:
8686
// CHECK-LABEL: testNEInitEscape: local_variable_reachable_uses with: %1, @instruction
8787
// CHECK: ### Access map:
8888
// CHECK-NEXT: Access map for: %{{.*}} = alloc_box ${ var NE }, var, name "self"
89-
// CHECK-NEXT: assign: true, store destroy_value %{{.*}} : ${ var NE }
90-
// CHECK-NEXT: assign: false, load %{{.*}} = load [copy] %{{.*}} : $*NE
91-
// CHECK-NEXT: assign: true, beginAccess %{{.*}} = begin_access [modify] [unknown] %{{.*}} : $*NE
92-
// CHECK-NEXT: assign: false, escape %6 = address_to_pointer %4 : $*NE to $Builtin.RawPointer
89+
// CHECK-NEXT: assign: value, hasEscaped: unknown, store, destroy_value %{{.*}} : ${ var NE }
90+
// CHECK-NEXT: assign: no, hasEscaped: unknown, load, %{{.*}} = load [copy] %{{.*}} : $*NE
91+
// CHECK-NEXT: assign: value, hasEscaped: unknown, beginAccess, %{{.*}} = begin_access [modify] [unknown] %{{.*}} : $*NE
92+
// CHECK-NEXT: assign: no, hasEscaped: true, escape, %6 = address_to_pointer %4 : $*NE to $Builtin.RawPointer
9393
// CHECK-NEXT: ### Modify: %{{.*}} = begin_access [modify] [unknown] %4 : $*NE
9494
// CHECK-NEXT: !!! Reachable escape
9595
// CHECK-NEXT: testNEInitEscape: local_variable_reachable_uses with: %1, @instruction

0 commit comments

Comments
 (0)