@@ -90,12 +90,12 @@ public distributed actor MyOtherActor {
90
90
91
91
// CHECK: define hidden swifttailcc void @"$s27distributed_actor_accessors7MyActorC7simple1yySiFTE"
92
92
93
- // CHECK: define internal swifttailcc void @"$s27distributed_actor_accessors7MyActorC7simple1yySiFTETF"(%swift.context* swiftasync %0, i8* %1, i8* %2, % T27distributed_actor_accessors7MyActorC* %3 )
93
+ // CHECK: define internal swifttailcc void @"$s27distributed_actor_accessors7MyActorC7simple1yySiFTETF"(%swift.context* swiftasync %0, i8* %1, i8* %2, i8* %3, {{.*}}, % T27distributed_actor_accessors7MyActorC* [[ACTOR:%.*]] )
94
94
95
95
/// Read the current offset and cast an element to `Int`
96
96
97
97
// CHECK: store i8* %1, i8** %offset
98
- // CHECK-NEXT : %elt_offset = load i8*, i8** %offset
98
+ // CHECK: %elt_offset = load i8*, i8** %offset
99
99
// CHECK-NEXT: [[ELT_PTR:%.*]] = bitcast i8* %elt_offset to %TSi*
100
100
// CHECK-NEXT: [[NATIVE_VAL_LOC:%.*]] = getelementptr inbounds %TSi, %TSi* [[ELT_PTR]], i32 0, i32 0
101
101
// CHECK-NEXT: [[ARG_VAL:%.*]] = load i32, i32* [[NATIVE_VAL_LOC]]
@@ -112,7 +112,7 @@ public distributed actor MyOtherActor {
112
112
// CHECK-SAME: i8* bitcast (void (%swift.context*, i32, %T27distributed_actor_accessors7MyActorC*)* @"$s27distributed_actor_accessors7MyActorC7simple1yySiFTE" to i8*)
113
113
// CHECK-SAME: %swift.context* [[THUNK_CONTEXT_PTR]],
114
114
// CHECK-SAME: i32 [[ARG_VAL]],
115
- // CHECK-SAME: %T27distributed_actor_accessors7MyActorC* %3 )
115
+ // CHECK-SAME: %T27distributed_actor_accessors7MyActorC* [[ACTOR]] )
116
116
117
117
// CHECK-NEXT: [[TASK_REF:%.*]] = extractvalue { i8*, %swift.error* } [[THUNK_RESULT]], 0
118
118
// CHECK-NEXT: {{.*}} = call i8* @__swift_async_resume_project_context(i8* [[TASK_REF]])
@@ -141,7 +141,7 @@ public distributed actor MyOtherActor {
141
141
// CHECK-SAME: i8* bitcast (void (%swift.context*, i32, %T27distributed_actor_accessors7MyActorC*)* @"$s27distributed_actor_accessors7MyActorC7simple2ySSSiFTE" to i8*)
142
142
// CHECK-SAME: %swift.context* [[THUNK_CONTEXT_PTR]],
143
143
// CHECK-SAME: i32 [[NATIVE_ARG_VAL]],
144
- // CHECK-SAME: %T27distributed_actor_accessors7MyActorC* %3 )
144
+ // CHECK-SAME: %T27distributed_actor_accessors7MyActorC* [[ACTOR]] )
145
145
146
146
// CHECK-NEXT: [[TASK_REF:%.*]] = extractvalue { i8*, i32, i32, i32, %swift.error* } [[THUNK_RESULT]], 0
147
147
// CHECK-NEXT: {{.*}} = call i8* @__swift_async_resume_project_context(i8* [[TASK_REF]])
@@ -160,7 +160,7 @@ public distributed actor MyOtherActor {
160
160
// CHECK: define hidden swifttailcc void @"$s27distributed_actor_accessors7MyActorC7simple3ySiSSFTE"
161
161
162
162
/// !!! in `simple3` interesting bits are: argument value extraction (because string is exploded into N arguments) and call to distributed thunk
163
- // CHECK: define internal swifttailcc void @"$s27distributed_actor_accessors7MyActorC7simple3ySiSSFTETF"(%swift.context* swiftasync {{.*}}, i8* [[ARG_BUFF:%.*]], i8* [[RESULT_BUFF:%.*]], % T27distributed_actor_accessors7MyActorC* {{.*}} )
163
+ // CHECK: define internal swifttailcc void @"$s27distributed_actor_accessors7MyActorC7simple3ySiSSFTETF"(%swift.context* swiftasync {{.*}}, i8* [[ARG_BUFF:%.*]], i8* [[ARG_TYPES:%.*]], i8* [[ RESULT_BUFF:%.*]], i8* [[SUBS:%.*]], i8* [[WITNESS_TABLES:%.*]], i32 [[NUM_WITNESS_TABLES:%.*]], % T27distributed_actor_accessors7MyActorC* [[ACTOR:%.*]] )
164
164
165
165
// CHECK: [[TYPED_RESULT_BUFF:%.*]] = bitcast i8* [[RESULT_BUFF]] to %TSi*
166
166
@@ -180,9 +180,9 @@ public distributed actor MyOtherActor {
180
180
// CHECK: [[TMP_STR_ARG:%.*]] = bitcast { i32, i32, i32 }* %temp-coercion.coerced to %TSS*
181
181
// CHECK-NEXT: %._guts1 = getelementptr inbounds %TSS, %TSS* [[TMP_STR_ARG]], i32 0, i32 0
182
182
183
- // CHECK: store i32 %10 , i32* %._guts1._object._count._value, align 4
183
+ // CHECK: store i32 {{.*}} , i32* %._guts1._object._count._value
184
184
// CHECK: [[VARIANT:%.*]] = bitcast %Ts13_StringObjectV7VariantO* %._guts1._object._variant to i32*
185
- // CHECK-NEXT: store i32 %12 , i32* [[VARIANT]], align 4
185
+ // CHECK-NEXT: store i32 %17 , i32* [[VARIANT]]
186
186
187
187
// CHECK: [[STR_ARG_SIZE_PTR:%.*]] = getelementptr inbounds { i32, i32, i32 }, { i32, i32, i32 }* %temp-coercion.coerced, i32 0, i32 0
188
188
// CHECK: [[STR_ARG_SIZE:%.*]] = load i32, i32* [[STR_ARG_SIZE_PTR]]
@@ -203,7 +203,7 @@ public distributed actor MyOtherActor {
203
203
// CHECK-SAME: i32 [[STR_ARG_SIZE]],
204
204
// CHECK-SAME: i32 [[STR_ARG_VAL]],
205
205
// CHECK_SAME: i32 [[STR_ARG_FLAGS]],
206
- // CHECK-SAME: %T27distributed_actor_accessors7MyActorC* %3 )
206
+ // CHECK-SAME: %T27distributed_actor_accessors7MyActorC* [[ACTOR]] )
207
207
208
208
// CHECK-NEXT: [[TASK_REF:%.*]] = extractvalue { i8*, i32, %swift.error* } [[THUNK_RESULT]], 0
209
209
// CHECK-NEXT: {{.*}} = call i8* @__swift_async_resume_project_context(i8* [[TASK_REF]])
@@ -216,15 +216,14 @@ public distributed actor MyOtherActor {
216
216
217
217
// CHECK: define hidden swifttailcc void @"$s27distributed_actor_accessors7MyActorC16single_case_enumyAA7SimpleEOAFFTE"
218
218
219
- // CHECK: define internal swifttailcc void @"$s27distributed_actor_accessors7MyActorC16single_case_enumyAA7SimpleEOAFFTETF"(%swift.context* swiftasync %0, i8* [[BUFFER:%.*]], i8* [[RESULT_BUFF:%.*]], % T27distributed_actor_accessors7MyActorC* {{.*}} )
219
+ // CHECK: define internal swifttailcc void @"$s27distributed_actor_accessors7MyActorC16single_case_enumyAA7SimpleEOAFFTETF"(%swift.context* swiftasync %0, i8* [[BUFFER:%.*]], i8* [[ARG_TYPES:%.*]], i8* [[ RESULT_BUFF:%.*]], i8* [[SUBS:%.*]], i8* [[WITNESS_TABLES:%.*]], i32 [[NUM_WITNESS_TABLES:%.*]], % T27distributed_actor_accessors7MyActorC* [[ACTOR:%.*]] )
220
220
221
221
/// First, let's check that there were no loads from the argument buffer and no stores to "current offset".
222
222
223
223
// CHECK: [[OFFSET:%.*]] = bitcast i8** %offset to i8*
224
224
// CHECK-NEXT: call void @llvm.lifetime.start.p0i8(i64 4, i8* [[OFFSET]])
225
225
// CHECK-NEXT: store i8* [[BUFFER]], i8** %offset
226
- // CHECK-NEXT: %elt_offset = load i8*, i8** %offset
227
- // CHECK-NEXT: [[ELT_PTR:.*]] = bitcast i8* %elt_offset to %T27distributed_actor_accessors7SimpleEO*
226
+ // CHECK: %elt_offset = load i8*, i8** %offset
228
227
// CHECK-NEXT: [[OFFSET:%.*]] = bitcast i8** %offset to i8*
229
228
// CHECK-NEXT call void @llvm.lifetime.end.p0i8(i32 8, i8* [[OFFSET]])
230
229
@@ -241,8 +240,9 @@ public distributed actor MyOtherActor {
241
240
242
241
/// First, Load both arguments from the buffer.
243
242
244
- // CHECK: [[TYPED_RESULT_BUFF:%.*]] = bitcast i8* %2 to %T27distributed_actor_accessors9IndirectEO*
243
+ // CHECK: [[TYPED_RESULT_BUFF:%.*]] = bitcast i8* [[RESULT_BUFF]] to %T27distributed_actor_accessors9IndirectEO*
245
244
// CHECK: store i8* %1, i8** %offset
245
+ // CHECK-NEXT: {{.*}} = bitcast i8* [[ARG_TYPES]] to %swift.type**
246
246
// CHECK-NEXT: %elt_offset = load i8*, i8** %offset
247
247
248
248
// CHECK-NEXT: [[ENUM_PTR:%.*]] = bitcast i8* %elt_offset to %T27distributed_actor_accessors9IndirectEO*
@@ -272,7 +272,7 @@ public distributed actor MyOtherActor {
272
272
273
273
// CHECK: define hidden swifttailcc void @"$s27distributed_actor_accessors7MyActorC7complexyAA11LargeStructVSaySiG_AA3ObjCSSSgAFtFTE"
274
274
275
- // CHECK: define internal swifttailcc void @"$s27distributed_actor_accessors7MyActorC7complexyAA11LargeStructVSaySiG_AA3ObjCSSSgAFtFTETF"(%swift.context* swiftasync {{.*}}, i8* [[ARG_BUFF:%.*]], i8* [[RESULT_BUFF:%.*]], % T27distributed_actor_accessors7MyActorC* {{.*}} )
275
+ // CHECK: define internal swifttailcc void @"$s27distributed_actor_accessors7MyActorC7complexyAA11LargeStructVSaySiG_AA3ObjCSSSgAFtFTETF"(%swift.context* swiftasync {{.*}}, i8* [[ARG_BUFF:%.*]], i8* [[ARG_TYPES:%.*]], i8* [[ RESULT_BUFF:%.*]], i8* [[SUBS:%.*]], i8* [[WITNESS_TABLES:%.*]], i32 [[NUM_WITNESS_TABLES:%.*]], % T27distributed_actor_accessors7MyActorC* [[ACTOR:%.*]] )
276
276
277
277
/// First, let's check that all of the different argument types here are loaded correctly.
278
278
@@ -340,7 +340,7 @@ public distributed actor MyOtherActor {
340
340
341
341
/// Let's check that there is no offset allocation here since parameter list is empty
342
342
343
- // CHECK: define internal swifttailcc void @"$s27distributed_actor_accessors12MyOtherActorC5emptyyyFTETF"(%swift.context* swiftasync {{.*}}, i8* [[ARG_BUFF:%.*]], i8* [[RESULT_BUFF:%.*]], %T27distributed_actor_accessors12MyOtherActorC* {{.*}})
343
+ // CHECK: define internal swifttailcc void @"$s27distributed_actor_accessors12MyOtherActorC5emptyyyFTETF"(%swift.context* swiftasync {{.*}}, i8* [[ARG_BUFF:%.*]], i8* [[ARG_TYPES:%.*]], i8* [[ RESULT_BUFF:%.*]], i8* [[SUBS:%.*]], i8* [[WITNESS_TABLES:%.*]], i32 [[NUM_WITNESS_TABLES :%.*]], %T27distributed_actor_accessors12MyOtherActorC* {{.*}})
344
344
// CHECK-NEXT: entry:
345
345
// CHECK-NEXT: {{.*}} = alloca %swift.context*
346
346
// CHECK-NEXT: %swifterror = alloca %swift.error*
0 commit comments