[6.0] [PackageCMO] Support inlinability with [serialized_for_package] #73876
Closed
elsh wants to merge 1 commit intorelease/6.0from
Closed
[6.0] [PackageCMO] Support inlinability with [serialized_for_package] #73876elsh wants to merge 1 commit intorelease/6.0from
elsh wants to merge 1 commit intorelease/6.0from
Conversation
[serialized_for_package] if Package CMO is enabled. The latter kind allows a function to be serialized even if it contains loadable types, if Package CMO is enabled. Renamed IsSerialized_t as SerializedKind_t. The tri-state serialization kind requires validating inlinability depending on the serialization kinds of callee vs caller; e.g. if the callee is [serialized_for_package], the caller must be _not_ [serialized]. Renamed `hasValidLinkageForFragileInline` as `canBeInlinedIntoCaller` that takes in its caller's SerializedKind as an argument. Another argument `assumeFragileCaller` is also added to ensure that the calle sites of this function know the caller is serialized unless it's called for SIL inlining optimization passes. The [serialized_for_package] attribute is allowed for SIL function, global var, v-table, and witness-table. Resolves rdar://128406520
Contributor
Contributor
Author
I was thinking the same. Some of the previous PRs contain changes that have gotten reverted due to further updates so it might be easier to squash all or at least into a few and cherry-pick those. |
Contributor
Author
|
Included in #73993 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
serialized_for_pkg. Adds a new inlinability rule depending on the caller and callee SerializedKind to allow more inlining during Package CMO.