-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SIL][PackageCMO] Fix dispatch thunk linker error and update table serialization #74070
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
Conversation
* Do not use [serialized_for_package] for witness method before Package CMO. * Update v-table and witness-table and their entry serialization. -- Allow non-serialized but visible entries in a serialized table so they can be optimized by other SIL opt passes. * Only serialize MethodInst if it has the right visibility. Resolves rdar://129089105&129088935
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks reasonable to me.
acknowleding that there will be a future patch that:
- does not set the serialized attribute for package serialization in SILGen
- implement a systematic way (refactoring a type and a decl visitor for instructions as @slavapestov has eluded to earlier) to find instructions that block package serialization
this can be done in later PRs
return !method->hasValidLinkageForFragileRef(getRightSerializedKind(M)); | ||
}); | ||
if (!containsInternal) | ||
wt.setSerializedKind(getRightSerializedKind(M)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the logics for serializing v-table and w-table are very much alike. Can we extract a common function to handle both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these checks might not be necessary but added as a caution as mentioned in the comments; will follow up and remove them if found to be unnecessary.
Update lambda in table serialization. Add more tests.
@swift-ci test |
Does this PR #73902 need to be merged first? It seems this PR would have a dependency on it. |
yup, merged. |
@swift-ci test |
Resolves rdar://129089105&129088935