File tree Expand file tree Collapse file tree 3 files changed +2
-18
lines changed Expand file tree Collapse file tree 3 files changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -25,16 +25,6 @@ AddressUseKind TransitiveAddressWalker::walk(SILValue projectedAddress) && {
25
25
// When we exit, set the result to be invalidated so we can't use this again.
26
26
SWIFT_DEFER { didInvalidate = true ; };
27
27
28
- // If the projectedAddress is dead, it is itself a leaf use. Since we don't
29
- // have an operand for it, simply bail. Dead projectedAddress is unexpected.
30
- //
31
- // TODO: store_borrow is currently an InteriorPointer with no uses, so we end
32
- // up bailing. It should be in a dependence scope instead. It's not clear why
33
- // it produces an address at all.
34
- if (projectedAddress->use_empty ()) {
35
- return AddressUseKind::PointerEscape;
36
- }
37
-
38
28
StackList<Operand *> worklist (projectedAddress->getFunction ());
39
29
SmallPtrSet<Operand *, 32 > visitedOperands;
40
30
Original file line number Diff line number Diff line change 501
501
%copy1 = copy_value %borrow1 : $C
502
502
%borrow2 = begin_borrow %copy1 : $C
503
503
%addr = ref_element_addr %borrow2 : $C, #C.a
504
+ %ptr = address_to_pointer %addr : $*Int64 to $Builtin.RawPointer
504
505
cond_br undef, bb1, bb2
505
506
bb1:
506
507
// inside use
@@ -1201,4 +1202,3 @@ bb0(%0 : @guaranteed $C):
1201
1202
%7 = tuple ()
1202
1203
return %7 : $()
1203
1204
}
1204
-
Original file line number Diff line number Diff line change @@ -222,19 +222,13 @@ bb4(%phi : @owned $C):
222
222
return %99 : $()
223
223
}
224
224
225
- // A dead (ref_element_addr) projection is treated like a pointer
226
- // escape for convenience. Make sure the pointer escape bubbles up
227
- // through the phi and casts.
228
- //
229
225
// CHECK-LABEL: testSSADeadRefElementAddr: ssa-liveness
230
226
// CHECK: SSA lifetime analysis: %0 = argument of bb0 : $C
231
- // CHECK-NEXT: Incomplete liveness: Escaping address
232
227
// CHECK-NEXT: bb0: LiveOut
233
228
// CHECK-NEXT: bb2: LiveOut
234
229
// CHECK-NEXT: bb3: LiveWithin
235
230
// CHECK-NEXT: bb1: LiveOut
236
- // CHECK: last user:
237
- // CHECK-SAME: ref_element_addr %6 : $D, #D.object
231
+ // CHECK: ref_element_addr %6 : $D, #D.object
238
232
// CHECK-NEXT-LABEL: end running test 1 of 1 on testSSADeadRefElementAddr: ssa-liveness
239
233
sil [ossa] @testSSADeadRefElementAddr : $@convention(thin) (@guaranteed C) -> () {
240
234
bb0(%0 : @guaranteed $C):
You can’t perform that action at this time.
0 commit comments