Skip to content

[PackageCMO] Make optimized binary module work for package-external client. #76729

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 1 commit into from
Oct 9, 2024

Conversation

elsh
Copy link
Contributor

@elsh elsh commented Sep 26, 2024

A binary module with PackageCMO includes instructions that are typically disallowed in resilient mode. If the client module belongs to the same package, these instructions can be deserialized and inlined during optimization. However, this must be prevented for clients outside the package, as such instructions are invalid beyond the package domain and could trigger an assertion failure.

Resolves rdar://135345358

@elsh elsh requested review from nkcsgexi, artemcm, aschwaighofer and tshortli and removed request for xymus September 26, 2024 20:59
@elsh
Copy link
Contributor Author

elsh commented Sep 26, 2024

@swift-ci smoke test

@elsh elsh changed the title [PackageCMO] Make binary module work for package-external client. [PackageCMO] Make optimized binary module work for package-external client. Sep 26, 2024
@aschwaighofer
Copy link
Contributor

Also needs test cases for (and code to handle deserialization of) sil_vtable and sil_witness_table

@elsh
Copy link
Contributor Author

elsh commented Sep 27, 2024

@swift-ci smoke test

A binary module with PackageCMO includes instructions that are typically disallowed in resilient mode. If the client module belongs to the same package, these instructions can be deserialized and inlined during optimization. However, this must be prevented for clients outside the package, as such instructions are invalid beyond the package domain and could trigger an assertion failure.

Resolves rdar://135345358
@elsh elsh force-pushed the elsh/pcmo-ext-client branch from 932ee0c to c8d7e94 Compare October 9, 2024 08:12
@elsh
Copy link
Contributor Author

elsh commented Oct 9, 2024

@swift-ci smoke test

@elsh
Copy link
Contributor Author

elsh commented Oct 9, 2024

@swift-ci smoke test windows

@elsh elsh enabled auto-merge October 9, 2024 19:57
@elsh elsh merged commit f631dfa into main Oct 9, 2024
3 checks passed
@elsh elsh deleted the elsh/pcmo-ext-client branch October 9, 2024 20:04
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