-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SIL][PackageCMO] Allow optimizing [serialized_for_pkg] functions #73902
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
@swift-ci test |
We will also want to update the SwiftCompilerSources, they have instances of both usage of
This code for example needs updating to take into account our canInlineInto matrix:
|
@swift-ci test |
@swift-ci test macOS |
…ing SIL inlining, generic/closure specialization, and devirtualization optimization passes. SILFunction::canBeInlinedIntoCaller now exlicitly requires a caller's SerializedKind_t arg. isAnySerialized() is added as a convenience function that checks if [serialized] or [serialized_for_pkg]. Resolves rdar://128704752
The functional part makes sense to me. Can we add tests to ensure that these optimization passes are actually active for serialized_for_pkg functions? |
The added changes since my last review look good to me. We also need a change in SwiftCompilerSources/Sources/Optimizer/Utilities/OptUtils.swift to take serializedForPackage into account:
|
Add isAnySerialized() and canBeInlinedIntoCaller(SerializedKind).
@swift-ci test |
More tests including this are in the upcoming PR. |
Allow optimizing
[serialized_for_pkg]
functions during SIL inlining, generic/closure specialization, and devirtualization optimization passes.SILFunction::canBeInlinedIntoCaller
now exlicitly requires a caller'sSerializedKind_t
arg.isAnySerialized()
is added as a convenience function that checks if[serialized]
or[serialized_for_pkg]
.Resolves rdar://128704752