Skip to content

[6.0] [PackageCMO] Serialize SIL witness-tables and v-tables #73865

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

Closed
wants to merge 1 commit into from

Conversation

elsh
Copy link
Contributor

@elsh elsh commented May 23, 2024

  • Explanation: Serialize v-tables and witness-tables and their entries if Package CMO is enabled. Without it, witness method calls are made, which is inefficient. Also functions to look up are ordered bottom-up so the inner-most referenced functions can be serialized first during the optimization.
  • Scope: Affects Package CMO only
  • Original PR: Serialize SIL witness-tables and v-tables if package cmo is enabled. #72606
  • Risk: Low. Changes are behind a flag and only affects Package CMO.
  • Testing: Added new tests.
  • Issue: rdar://124632670&128647016
  • Reviewer: @aschwaighofer

…e cmo is

enabled. If two modules are in the same package and package cmo is enabled,
v-table or witness-table calls should not be generated at the use site in the
client module. Modified conformance serialization check to allow serializing
witness thunks.

Also reordered SIL functions bottom-up so the most nested referenced functions
can be serialized first. Allowed serializing a function if a shared definition
(e.g. function `print`). Added a check for resilient mode wrt struct instructions.

Added tests for SIL tables and resilient mode on/off.

rdar://124632670
@elsh elsh requested a review from a team as a code owner May 23, 2024 23:34
@elsh
Copy link
Contributor Author

elsh commented May 23, 2024

@swift-ci test

@elsh
Copy link
Contributor Author

elsh commented May 30, 2024

Included in #73993

@elsh elsh closed this May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant