Skip to content

Conversation

@nate-chandler
Copy link
Contributor

In address-lowered mode, to initialize tuple-typed memory in a single step, tuple_addr_constructor must generally be used because it's not possible to construct a tuple any of whose fields are address-only. In opaque values mode, there is no problem constructing such a tuple. So construct the tuple and then assign it into the tuple-typed memory; the single instruction that initializes the memory will be the assign.

The instruction exists to express the atomic initialization of a
tuple-typed address in address-lowered mode.  In opaque-values mode,
this is expressed as an assign/store.
In address-lowered mode, to initialize tuple-typed memory in a single
step, tuple_addr_constructor must generally be used because it's not
possible to construct a tuple any of whose fields are address-only.  In
opaque values mode, there is no problem constructing such a tuple.  So
construct the tuple and then assign it into the tuple-typed memory; the
single instruction that initializes the memory will be the assign.
@nate-chandler nate-chandler marked this pull request as ready for review January 5, 2024 21:30
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler merged commit 7787da1 into swiftlang:main Jan 8, 2024
@nate-chandler nate-chandler deleted the opaque-values/20240105/1/init-tuple-typed branch January 8, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant