Skip to content

[region-isolation] Initial refactoring work for supporting Transferring Args and Results #70653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 3, 2024

Conversation

gottesmm
Copy link
Contributor

Just in progress.

@gottesmm
Copy link
Contributor Author

gottesmm commented Dec 31, 2023

Just beginning to test out some support/refactoring that I am doing here before adding in the larger part of work here. Specifically, I am using code already in tree to do some early testing.

@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm
Copy link
Contributor Author

gottesmm commented Jan 2, 2024

@swift-ci test

…ork for general experimental features instead of just NonEscapableTypes.
… than passing around a bunch of state.

Just refactoring before adding /another/ field to these APIs. It hurt to do so
so I needed to refactor.

NFCI.
@gottesmm gottesmm changed the title [region-isolation] Support for Transferring Parameters. [region-isolation] Initial refactoring work for supporting Transferring Args and Results Jan 2, 2024
@gottesmm gottesmm marked this pull request as ready for review January 2, 2024 20:21
@gottesmm
Copy link
Contributor Author

gottesmm commented Jan 2, 2024

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

gottesmm commented Jan 2, 2024

Actual swift-syntax PR: swiftlang/swift-syntax#2411

@gottesmm
Copy link
Contributor Author

gottesmm commented Jan 2, 2024

swiftlang/swift-syntax#2411

@swift-ci smoke test

…eter to use an OptionSet so we can add other options.

I am doing this in preparation for adding options to SILParameterInfo/
SILResultInfo that state that a parameter/result is transferring. Even though I
could have just introduced a new bit here, I instead streamlined the interface
of SILParameterInfo/SILResultInfo to use an OptionSet instead of individual bits
to make it easier to add new flags here. The reason why it is easier is that
along API (e.x.: function argument) boundaries one does not have to marshal each
field or pass each field. Instead one can just pass the whole OptionSet as an
opaque thing. Using this I was able to change serialization/deserialization of
SILParameterInfo/SILResultInfo so that one does not need to update them if one
adds new fields!

The reason why I am doing this for both SILParameterInfo/SILResultInfo in the
same commit is because they share code in the demangler that I did not want to
have to duplicate in an intervening commit. By changing them both at the same
type, I didn't have to change anything without an actual need to.

I am doing this in a separate commit from adding transferring support so I can
validate correctness using the tests for the options already supported
(currently only differentiability).
Just splitting off a larger commit to make this easier to review.
@gottesmm
Copy link
Contributor Author

gottesmm commented Jan 2, 2024

swiftlang/swift-syntax#2411

@swift-ci smoke test

@gottesmm gottesmm merged commit 6d00750 into swiftlang:main Jan 3, 2024
@gottesmm gottesmm deleted the transferring branch January 3, 2024 02:51
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.

2 participants