Skip to content

Commit 61c4e85

Browse files
authored
Merge pull request #18186 from gottesmm/pr-17a6d1e59533a646cfd8bb69ff9f7be24a5327dd
2 parents 3db9496 + be56890 commit 61c4e85

File tree

119 files changed

+537
-539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+537
-539
lines changed

lib/ParseSIL/ParseSIL.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5092,7 +5092,6 @@ bool SILParser::parseSILBasicBlock(SILBuilder &B) {
50925092
if (!F->getModule()
50935093
.getOptions()
50945094
.AssumeUnqualifiedOwnershipWhenParsing &&
5095-
F->getModule().getOptions().EnableSILOwnership &&
50965095
parseSILOwnership(OwnershipKind))
50975096
return true;
50985097

lib/SIL/SILPrinter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,8 +589,7 @@ class SILPrinter : public SILInstructionVisitor<SILPrinter> {
589589

590590
// If SIL ownership is enabled and the given function has not had ownership
591591
// stripped out, print out ownership of SILArguments.
592-
if (BB->getModule().getOptions().EnableSILOwnership &&
593-
BB->getParent()->hasQualifiedOwnership()) {
592+
if (BB->getParent()->hasQualifiedOwnership()) {
594593
*this << getIDAndTypeAndOwnership(Args[0]);
595594
for (SILArgument *Arg : Args.drop_front()) {
596595
*this << ", " << getIDAndTypeAndOwnership(Arg);

test/ClangImporter/static_inline.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
// RUN: %target-swift-frontend -parse-as-library -module-name=static_inline -emit-sil %S/Inputs/static_inline.swift -enable-objc-interop -import-objc-header %S/Inputs/static_inline.h -o %t/static_inline.sil
66
// RUN: %FileCheck < %t/static_inline.sil %s
7-
// RUN: %target-swift-frontend -parse-as-library -module-name=static_inline -O -emit-ir %t/static_inline.sil -enable-objc-interop -import-objc-header %S/Inputs/static_inline.h | %FileCheck --check-prefix=CHECK-IR %s
7+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -parse-as-library -module-name=static_inline -O -emit-ir %t/static_inline.sil -enable-objc-interop -import-objc-header %S/Inputs/static_inline.h | %FileCheck --check-prefix=CHECK-IR %s
88

99
// CHECK: sil shared [serializable] [clang c_inline_func] @c_inline_func : $@convention(c) (Int32) -> Int32
1010

test/DebugInfo/simple.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Builtin
66
import Swift
77

88
sil @square : $@convention(thin) (Int32) -> Int32 {
9-
bb0(%0 : $Int32):
9+
bb0(%0 : @trivial $Int32):
1010
debug_value %0 : $Int32, let, name "x" // id: %1
1111
%3 = struct_extract %0 : $Int32, #Int32._value // user: %6
1212
%4 = struct_extract %0 : $Int32, #Int32._value // user: %6

test/IRGen/archetype_resilience.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public enum EnumWithClassArchetypeAndDynamicSize<T : AnyObject> {
2020
// CHECK: call %T20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeO* @"$S20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeOyxGRlzCr0_lWOc"(%T20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeO* %0, %T20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeO* {{.*}}, %swift.type* %"EnumWithClassArchetypeAndDynamicSize<T>")
2121
// CHECK: ret void
2222
sil @copyDynamicMultiEnum : $@convention(method) <T, U where T: AnyObject> (@in_guaranteed EnumWithClassArchetypeAndDynamicSize<T>) -> () {
23-
bb0(%0 : $*EnumWithClassArchetypeAndDynamicSize<T>):
23+
bb0(%0 : @trivial $*EnumWithClassArchetypeAndDynamicSize<T>):
2424
%1 = alloc_stack $EnumWithClassArchetypeAndDynamicSize<T>
2525
copy_addr %0 to [initialization] %1 : $*EnumWithClassArchetypeAndDynamicSize<T>
2626
dealloc_stack %1 : $*EnumWithClassArchetypeAndDynamicSize<T>

test/IRGen/autorelease.sil

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ import Swift
1515
class C {}
1616
sil_vtable C {}
1717
sil @_TFC11autorelease1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
18-
bb0(%0 : $C):
18+
bb0(%0 : @owned $C):
1919
%1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
2020
return %1 : $Builtin.NativeObject // id: %2
2121
}
2222

2323
sil @foo : $@convention(thin) (@owned C?) -> @autoreleased C? {
24-
bb0(%0 : $C?):
24+
bb0(%0 : @owned $C?):
2525
return %0 : $C?
2626
}
2727
// x86_64: define{{( dllexport| protected)?}} swiftcc i64 @foo(i64) {{.*}} {
@@ -49,7 +49,7 @@ bb0(%0 : $C?):
4949
// armv7k-NEXT: ret i32 [[T0]]
5050

5151
sil @bar : $@convention(thin) (@owned C?) -> @owned C? {
52-
bb0(%0 : $C?):
52+
bb0(%0 : @owned $C?):
5353
%1 = function_ref @foo : $@convention(thin) (@owned C?) -> @autoreleased C?
5454
%2 = apply %1(%0) : $@convention(thin) (@owned C?) -> @autoreleased C?
5555
return %2 : $C?

test/IRGen/autorelease_optimized_aarch64.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class C {}
1313
sil_vtable C {}
1414

1515
sil @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
16-
bb0(%0 : $C):
16+
bb0(%0 : @owned $C):
1717
%1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
1818
return %1 : $Builtin.NativeObject // id: %2
1919
}
@@ -22,7 +22,7 @@ sil public_external @foo : $@convention(thin) (@owned C) -> @autoreleased C
2222
sil public_external @bar : $@convention(thin) (@owned C) -> ()
2323

2424
sil @baz : $@convention(thin) (@owned C) -> () {
25-
bb0(%0 : $C):
25+
bb0(%0 : @owned $C):
2626
%1 = function_ref @foo : $@convention(thin) (@owned C) -> @autoreleased C
2727
%2 = apply %1(%0) : $@convention(thin) (@owned C) -> @autoreleased C
2828

test/IRGen/autorelease_optimized_armv7.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class C {}
1313
sil_vtable C {}
1414

1515
sil @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
16-
bb0(%0 : $C):
16+
bb0(%0 : @owned $C):
1717
%1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
1818
return %1 : $Builtin.NativeObject // id: %2
1919
}
@@ -22,7 +22,7 @@ sil public_external @foo : $@convention(thin) (@owned C) -> @autoreleased C
2222
sil public_external @bar : $@convention(thin) (@owned C) -> ()
2323

2424
sil @baz : $@convention(thin) (@owned C) -> () {
25-
bb0(%0 : $C):
25+
bb0(%0 : @owned $C):
2626
%1 = function_ref @foo : $@convention(thin) (@owned C) -> @autoreleased C
2727
%2 = apply %1(%0) : $@convention(thin) (@owned C) -> @autoreleased C
2828

test/IRGen/autorelease_optimized_x86_64.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class C {}
1313
sil_vtable C {}
1414

1515
sil @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
16-
bb0(%0 : $C):
16+
bb0(%0 : @owned $C):
1717
%1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
1818
return %1 : $Builtin.NativeObject // id: %2
1919
}
@@ -22,7 +22,7 @@ sil public_external @foo : $@convention(thin) (@owned C) -> @autoreleased C
2222
sil public_external @bar : $@convention(thin) (@owned C) -> ()
2323

2424
sil @baz : $@convention(thin) (@owned C) -> () {
25-
bb0(%0 : $C):
25+
bb0(%0 : @owned $C):
2626
%1 = function_ref @foo : $@convention(thin) (@owned C) -> @autoreleased C
2727
%2 = apply %1(%0) : $@convention(thin) (@owned C) -> @autoreleased C
2828

test/IRGen/big_types_tests.sil

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir -enable-large-loadable-types | %FileCheck %s
1+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -I %S/Inputs/abi %s -emit-ir -enable-large-loadable-types | %FileCheck %s
22

33
// REQUIRES: CPU=x86_64
44
// REQUIRES: OS=macosx
@@ -21,11 +21,11 @@ public struct BigStruct {
2121

2222
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @testDestroyValue(%T15big_types_tests9BigStructV* noalias nocapture dereferenceable({{.*}}) #0 {
2323
// CHECK-NEXT: entry
24-
// CHECK-NEXT: call %T15big_types_tests9BigStructV* @"$S15big_types_tests9BigStructVWOh"(%T15big_types_tests9BigStructV* %0)
24+
// CHECK-NEXT: call %T15big_types_tests9BigStructV* @"$S15big_types_tests9BigStructVWOs"(%T15big_types_tests9BigStructV* %0)
2525
// CHECK-NEXT: ret void
2626
sil @testDestroyValue : $@convention(thin) (@owned BigStruct) -> () {
2727
entry(%x : $BigStruct):
28-
destroy_value %x : $BigStruct
28+
release_value %x : $BigStruct
2929
%ret = tuple ()
3030
return %ret : $()
3131
}

test/IRGen/builtin_word.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ entry:
3636
// ARM32: ret { i32, i64 } %4
3737
// ARM32: }
3838
sil @word_zextOrBitCast : $(Builtin.Int32, Builtin.Word) -> (Builtin.Word, Builtin.Int64) {
39-
entry(%i : $Builtin.Int32, %w : $Builtin.Word):
39+
entry(%i : @trivial $Builtin.Int32, %w : @trivial $Builtin.Word):
4040
%j = builtin "zextOrBitCast_Int32_Word"(%i : $Builtin.Int32) : $Builtin.Word
4141
%v = builtin "zextOrBitCast_Word_Int64"(%w : $Builtin.Word) : $Builtin.Int64
4242
%t = tuple (%j : $Builtin.Word, %v : $Builtin.Int64)
@@ -58,7 +58,7 @@ entry(%i : $Builtin.Int32, %w : $Builtin.Word):
5858
// ARM32: ret { i32, i32 } %4
5959
// ARM32: }
6060
sil @word_truncOrBitCast : $(Builtin.Word, Builtin.Int64) -> (Builtin.Int32, Builtin.Word) {
61-
entry(%w : $Builtin.Word, %i : $Builtin.Int64):
61+
entry(%w : @trivial $Builtin.Word, %i : @trivial $Builtin.Int64):
6262
%v = builtin "truncOrBitCast_Word_Int32"(%w : $Builtin.Word) : $Builtin.Int32
6363
%j = builtin "truncOrBitCast_Int64_Word"(%i : $Builtin.Int64) : $Builtin.Word
6464
%t = tuple (%v : $Builtin.Int32, %j : $Builtin.Word)

test/IRGen/class_isa_pointers.sil

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sil_vtable Purebred {}
2323
// CHECK: [[VTABLE:%.*]] = bitcast %swift.type* [[ISA]]
2424
// CHECK: getelementptr inbounds {{.*}} [[VTABLE]]
2525
sil @purebred_method : $@convention(thin) (@owned Purebred) -> () {
26-
entry(%0 : $Purebred):
26+
entry(%0 : @owned $Purebred):
2727
%m = class_method %0 : $Purebred, #Purebred.method!1 : (Purebred) -> () -> (), $@convention(method) (@guaranteed Purebred) -> ()
2828
%z = apply %m(%0) : $@convention(method) (@guaranteed Purebred) -> ()
2929
return %z : $()
@@ -47,7 +47,7 @@ sil_vtable Mongrel {}
4747
// CHECK: [[VTABLE:%.*]] = bitcast %swift.type* [[ISA]]
4848
// CHECK: getelementptr inbounds {{.*}} [[VTABLE]]
4949
sil @mongrel_method : $@convention(thin) (@owned Mongrel) -> () {
50-
entry(%0 : $Mongrel):
50+
entry(%0 : @owned $Mongrel):
5151
%m = class_method %0 : $Mongrel, #Mongrel.method!1 : (Mongrel) -> () -> (), $@convention(method) (@guaranteed Mongrel) -> ()
5252
%z = apply %m(%0) : $@convention(method) (@guaranteed Mongrel) -> ()
5353
return %z : $()
@@ -56,14 +56,14 @@ entry(%0 : $Mongrel):
5656
// ObjC stubs expected by ObjC metadata emission
5757

5858
sil private @$S18class_isa_pointers7MongrelC6methodyyFTo : $@convention(objc_method) (Purebred) -> () {
59-
entry(%0 : $Purebred):
59+
entry(%0 : @unowned $Purebred):
6060
unreachable
6161
}
6262
sil private @$S18class_isa_pointers7MongrelC7bellsOnACSgSi_tcfcTo : $@convention(objc_method) (Int, Purebred) -> () {
63-
entry(%0 : $Int, %1 : $Purebred):
63+
entry(%0 : @trivial $Int, %1 : @unowned $Purebred):
6464
unreachable
6565
}
6666
sil private @$S18class_isa_pointers7MongrelCACycfcTo : $@convention(objc_method) (Purebred) -> () {
67-
entry(%0 : $Purebred):
67+
entry(%0 : @unowned $Purebred):
6868
unreachable
6969
}

test/IRGen/copy_value_destroy_value.sil

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ struct Foo {
2020
// CHECK-NEXT: entry
2121
// CHECK-NEXT: ret void
2222
sil @trivial : $@convention(thin) (Builtin.Int32) -> () {
23-
bb0(%0 : $Builtin.Int32):
23+
bb0(%0 : @trivial $Builtin.Int32):
2424
%1 = copy_value %0 : $Builtin.Int32
2525
destroy_value %1 : $Builtin.Int32
2626
%2 = tuple()
@@ -37,7 +37,7 @@ bb0(%0 : $Builtin.Int32):
3737
// CHECK: call void @swift_release(%swift.refcounted* [[VAL1]])
3838
// CHECK: call void @swift_release(%swift.refcounted* [[VAL2]])
3939
sil @non_trivial : $@convention(thin) (@guaranteed Foo) -> () {
40-
bb0(%0 : $Foo):
40+
bb0(%0 : @guaranteed $Foo):
4141
%1 = copy_value %0 : $Foo
4242
destroy_value %1 : $Foo
4343
%2 = tuple()
@@ -48,7 +48,7 @@ bb0(%0 : $Foo):
4848
// CHECK: call %swift.refcounted* @swift_unownedRetainStrong(%swift.refcounted* returned %0)
4949
// CHECK: call void @swift_release(%swift.refcounted* %0)
5050
sil @non_trivial_unowned : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
51-
bb0(%0 : $Builtin.NativeObject):
51+
bb0(%0 : @guaranteed $Builtin.NativeObject):
5252
%1 = ref_to_unowned %0 : $Builtin.NativeObject to $@sil_unowned Builtin.NativeObject
5353
%2 = copy_unowned_value %1 : $@sil_unowned Builtin.NativeObject
5454
destroy_value %2 : $Builtin.NativeObject

test/IRGen/enum_32_bit.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %swift -target i386-apple-ios7 %s -gnone -emit-ir | %FileCheck %s
2-
// RUN: %swift -target armv7-apple-ios7 %s -gnone -emit-ir | %FileCheck %s
1+
// RUN: %swift -assume-parsing-unqualified-ownership-sil -target i386-apple-ios7 %s -gnone -emit-ir | %FileCheck %s
2+
// RUN: %swift -assume-parsing-unqualified-ownership-sil -target armv7-apple-ios7 %s -gnone -emit-ir | %FileCheck %s
33

44
// REQUIRES: CODEGENERATOR=X86
55
// REQUIRES: CODEGENERATOR=ARM

test/IRGen/enum_spare_bits.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ entry:
7474
return undef : $()
7575
}
7676

77-
sil @$S15enum_spare_bits1DCACycfcTo : $(@owned D) -> @owned D {
78-
entry(%x : $D):
77+
sil @$S15enum_spare_bits1DCACycfcTo : $@convention(thin) (@owned D) -> @owned D {
78+
entry(%x : @owned $D):
7979
return undef : $D
8080
}

test/IRGen/exclusivity.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sil public_external @changeInt : $@convention(thin) (@inout Int) -> ()
1414

1515
// CHECK-LABEL: define {{.*}} @test1(
1616
sil @test1 : $@convention(thin) (@owned A) -> Int {
17-
bb0(%0 : $A):
17+
bb0(%0 : @owned $A):
1818
// CHECK: [[SCRATCH0:%.*]] = alloca [[BUFFER_T:\[.* x i8\]]],
1919
// CHECK: [[SCRATCH1:%.*]] = alloca [[BUFFER_T:\[.* x i8\]]],
2020

test/IRGen/generic_classes.sil

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ entry:
265265
// CHECK: define{{( dllexport)?}}{{( protected)?}} swiftcc i8 @RootGeneric_concrete_fragile_dependent_member_access_x
266266
// CHECK: getelementptr inbounds [[ROOTGENERIC]], [[ROOTGENERIC]]* %0, i32 0, i32 1
267267
sil @RootGeneric_concrete_fragile_dependent_member_access_x : $<F> (RootGeneric<F>) -> UInt8 {
268-
entry(%c : $RootGeneric<F>):
268+
entry(%c : @unowned $RootGeneric<F>):
269269
%p = ref_element_addr %c : $RootGeneric<F>, #RootGeneric.x
270270
%x = load_borrow %p : $*UInt8
271271
return %x : $UInt8
@@ -280,7 +280,7 @@ entry(%c : $RootGeneric<F>):
280280
// CHECK: [[Y_ADDR:%.*]] = getelementptr inbounds i8, i8* [[CLASS_BYTE_ARRAY]], i64 [[Y_OFFSET]]
281281
// CHECK: bitcast i8* [[Y_ADDR]] to %swift.opaque*
282282
sil @RootGeneric_concrete_fragile_dependent_member_access_y : $<F> (RootGeneric<F>) -> @out F {
283-
entry(%z : $*F, %c : $RootGeneric<F>):
283+
entry(%z : @trivial $*F, %c : @unowned $RootGeneric<F>):
284284
%p = ref_element_addr %c : $RootGeneric<F>, #RootGeneric.y
285285
copy_addr %p to [initialization] %z : $*F
286286
%t = tuple ()
@@ -291,7 +291,7 @@ entry(%z : $*F, %c : $RootGeneric<F>):
291291
// CHECK: [[Y_ADDR:%.*]] = getelementptr inbounds {{.*}}, {{.*}}* %1, i32 0, i32 3
292292
// CHECK: bitcast %TSi* [[Y_ADDR]] to i8*
293293
sil @RootGeneric_subst_concrete_fragile_dependent_member_access_y : $(RootGeneric<Int>) -> @out Int {
294-
entry(%z : $*Int, %c : $RootGeneric<Int>):
294+
entry(%z : @trivial $*Int, %c : @unowned $RootGeneric<Int>):
295295
%p = ref_element_addr %c : $RootGeneric<Int>, #RootGeneric.y
296296
copy_addr %p to [initialization] %z : $*Int
297297
%t = tuple ()
@@ -307,7 +307,7 @@ entry(%z : $*Int, %c : $RootGeneric<Int>):
307307
// CHECK: [[Z_ADDR:%.*]] = getelementptr inbounds i8, i8* [[CLASS_BYTE_ARRAY]], i64 [[Z_OFFSET]]
308308
// CHECK: bitcast i8* [[Z_ADDR]] to %Ts5UInt8V*
309309
sil @RootGeneric_concrete_fragile_dependent_member_access_z : $<F> (RootGeneric<F>) -> UInt8 {
310-
entry(%c : $RootGeneric<F>):
310+
entry(%c : @unowned $RootGeneric<F>):
311311
%p = ref_element_addr %c : $RootGeneric<F>, #RootGeneric.z
312312
%z = load_borrow %p : $*UInt8
313313
return %z : $UInt8
@@ -318,7 +318,7 @@ entry(%c : $RootGeneric<F>):
318318
// CHECK: [[T0:%.*]] = getelementptr inbounds %Ts5UInt8V, %Ts5UInt8V* [[Z_ADDR]], i32 0, i32 0
319319
// CHECK: load i8, i8* [[T0]], align
320320
sil @RootGeneric_subst_concrete_fragile_dependent_member_access_z : $(RootGeneric<Int>) -> UInt8 {
321-
entry(%c : $RootGeneric<Int>):
321+
entry(%c : @unowned $RootGeneric<Int>):
322322
%p = ref_element_addr %c : $RootGeneric<Int>, #RootGeneric.z
323323
%z = load_borrow %p : $*UInt8
324324
return %z : $UInt8

test/IRGen/generic_classes_objc.sil

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ sil_vtable GenericInheritsObjC {}
2222

2323
// __deallocating_deinit
2424
sil @$S20generic_classes_objc19GenericInheritsObjCCfD : $@convention(method) <T> (GenericInheritsObjC<T>) -> () {
25-
bb0(%0 : $GenericInheritsObjC<T>):
25+
bb0(%0 : @unowned $GenericInheritsObjC<T>):
2626
unreachable
2727
}
2828

2929
// @objc init
3030
sil @$S20generic_classes_objc19GenericInheritsObjCCACyxGycfcTo : $@convention(objc_method) <T> (@owned GenericInheritsObjC<T>) -> @owned GenericInheritsObjC<T> {
31-
bb0(%0 : $GenericInheritsObjC<T>):
31+
bb0(%0 : @owned $GenericInheritsObjC<T>):
3232
unreachable
3333
}
3434

3535
sil @$S20generic_classes_objc19GenericInheritsObjCC7bellsOnACyxGSgSi_tcfcTo : $@convention(objc_method) <T> (Int, @owned GenericInheritsObjC<T>) -> @owned GenericInheritsObjC<T> {
36-
bb0(%0 : $Int, %1 : $GenericInheritsObjC<T>):
36+
bb0(%0 : @trivial $Int, %1 : @owned $GenericInheritsObjC<T>):
3737
unreachable
3838
}
3939

@@ -50,18 +50,18 @@ sil_vtable GenericInheritsObjC2 {}
5050

5151
// __deallocating_deinit
5252
sil @$S20generic_classes_objc20GenericInheritsObjC2CfD : $@convention(method) <T> (GenericInheritsObjC2<T>) -> () {
53-
bb0(%0 : $GenericInheritsObjC2<T>):
53+
bb0(%0 : @unowned $GenericInheritsObjC2<T>):
5454
unreachable
5555
}
5656

5757
// @objc init
5858
sil @$S20generic_classes_objc20GenericInheritsObjC2CACyxGycfcTo : $@convention(objc_method) <T> (@owned GenericInheritsObjC2<T>) -> @owned GenericInheritsObjC2<T> {
59-
bb0(%0 : $GenericInheritsObjC2<T>):
59+
bb0(%0 : @owned $GenericInheritsObjC2<T>):
6060
unreachable
6161
}
6262

6363
sil @$S20generic_classes_objc20GenericInheritsObjC2C7bellsOnACyxGSgSi_tcfcTo : $@convention(objc_method) <T> (Int, @owned GenericInheritsObjC<T>) -> @owned GenericInheritsObjC<T> {
64-
bb0(%0 : $Int, %1 : $GenericInheritsObjC<T>):
64+
bb0(%0 : @trivial $Int, %1 : @owned $GenericInheritsObjC<T>):
6565
unreachable
6666
}
6767

test/IRGen/invariant_load.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
22

3-
sil_stage canonical
3+
sil_stage lowered
44

55
import Builtin
66

@@ -11,7 +11,7 @@ struct X {
1111

1212
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @invariant_load
1313
sil @invariant_load : $@convention(thin) (Builtin.RawPointer) -> () {
14-
entry(%p : $Builtin.RawPointer):
14+
entry(%p : @trivial $Builtin.RawPointer):
1515
%a = pointer_to_address %p : $Builtin.RawPointer to [invariant] $*X
1616
// CHECK: load i32, {{.*}} !invariant.load
1717
// CHECK: load i32, {{.*}} !invariant.load

test/IRGen/keypaths.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ sil @n_get : $@convention(thin) <UU, TT> (@in_guaranteed TT) -> @out UU
317317
sil @n_set : $@convention(thin) <UU, TT> (@in_guaranteed UU, @in_guaranteed TT) -> ()
318318

319319
sil @computed_property_indices : $@convention(thin) (C, S, C, S, C, S) -> () {
320-
entry(%0 : $C, %1 : $S, %2 : $C, %3 : $S, %4 : $C, %5 : $S):
320+
entry(%0 : @unowned $C, %1 : @unowned $S, %2 : @unowned $C, %3 : @unowned $S, %4 : @unowned $C, %5 : @unowned $S):
321321
%o = keypath $WritableKeyPath<S, C>, (
322322
root $S;
323323
settable_property $C,
@@ -368,7 +368,7 @@ sil @r_get : $@convention(thin) (@in_guaranteed C, UnsafeRawPointer) -> @out S
368368
sil @r_set : $@convention(thin) (@in_guaranteed S, @in_guaranteed C, UnsafeRawPointer) -> ()
369369

370370
sil @generic_computed_property_indices : $@convention(thin) <A: Hashable, B: Hashable> (@in_guaranteed A, @in_guaranteed B, @in_guaranteed A, @in_guaranteed B, @in_guaranteed A, @in_guaranteed B) -> () {
371-
entry(%0 : $*A, %1 : $*B, %2 : $*A, %3 : $*B, %4 : $*A, %5 : $*B):
371+
entry(%0 : @trivial $*A, %1 : @trivial $*B, %2 : @trivial $*A, %3 : @trivial $*B, %4 : @trivial $*A, %5 : @trivial $*B):
372372
%s = keypath $WritableKeyPath<A, B>, <X: Hashable, Y: Hashable> (
373373
root $X;
374374
settable_property $Y,

test/IRGen/keypaths_objc.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ entry:
3636
}
3737

3838
sil hidden @$S13keypaths_objc1CC1xSo8NSStringCvgTo : $@convention(objc_method) (@guaranteed C) -> NSString {
39-
entry(%0 : $C):
39+
entry(%0 : @guaranteed $C):
4040
unreachable
4141
}
4242

4343
sil hidden @$S13keypaths_objc1CCACycfcTo : $@convention(objc_method) (@objc_metatype C.Type) -> @owned C {
44-
entry(%0 : $@objc_metatype C.Type):
44+
entry(%0 : @trivial $@objc_metatype C.Type):
4545
unreachable
4646
}
4747

0 commit comments

Comments
 (0)