Skip to content

SIL: Avoid serializing the bodies of the original copies of @_backDeploy functions #41961

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

Conversation

tshortli
Copy link
Contributor

Avoid serializing the bodies of the original copies of @_backDeploy functions to prevent the optimizer from inlining those bodies into their back deployment thunks. This ensures that the copy of the function in the library dylib is reliably called when it is available, both with and without optimizations enabled. Also update the attr_backDeploy_evolution test case to use precondition() instead of assert() since asserts are compiled out with optimizations enabled.

Resolves rdar://90525337

@tshortli tshortli requested a review from eeckstein March 22, 2022 21:44
…loy functions to prevent the optimizer from inlining those bodies into their back deployment thunks. This ensures that the copy of the function in the library dylib is reliably called when it is available, both with and without optimizations enabled. Also update the attr_backDeploy_evolution test case to use precondition() instead of assert() since asserts are compiled out with optimizations enabled.

Resolves rdar://90525337
@tshortli tshortli force-pushed the dont-serialize-back-deployed-originals branch from aeb1de5 to 0bb6a7b Compare March 22, 2022 22:31
@tshortli
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@tshortli tshortli merged commit 1dabda8 into swiftlang:main Mar 23, 2022
@tshortli tshortli deleted the dont-serialize-back-deployed-originals branch March 29, 2022 21:29
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