-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[5.3] Pull in changes from PR 34323, 34327, 34445 and 34495 #34791
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
Conversation
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
[5.3][Sema] Consider inherited platform unavailability to silence diagnostics
This pass was attempting to handle cases where we use load [take] + destroy_value instead of a destroy_addr since we have a loadable value. There are a few issues around how this was done, so for 5.3, we are just going to turn off the optimization. rdar://70356725
[temp-rvalue-opt] Disable handling of load [take] in temp-rvalue-elim.
Due to a couple of unfortunate circumstances, appending an NSArray instance to an Array instance does not actually append any elements. The cause is #29220, which accidentally optimized away the actual loop that appends the elements in this particular case. (And only this particular case, which is why this wasn’t detected by the test suite.) When the argument to `Array.append(contentsOf:)` is of type NSArray, the `newElements is [Element]` expression is compiled into a runtime check that returns true, eliminating the subsequent loop over the remaining items of the iterator. Sadly, NSArray.underestimatedCount` currently returns 0, so the earlier _copyContents call is a noop, so no elements get added to `self` at all. Turning the `is` test into a direct equality check between the metatype instances resolves the issue. (cherry picked from commit 184367c)
[5.3][stdlib] Fix Array.append(contentsOf:) for arguments of type NSArray
) GlobalOpt works mostly on trivial values (there are special cases for ObjectInst and ValueToBridgeObjectInst). optimizeGlobalAccess is explicitly turned off for non-trivial values. optimizeInitializer calls SILGlobalVariable::isValidStaticInitializerInst which limits it to mostly trivial values except for special cases for ObjectInst and ValueToBridgeObjectInst. This changes adds GlobalOpt tests for ossa and enables GlobalOpt on ossa Co-authored-by: Meghana Gupta <[email protected]>
@swift-ci test |
Why did you include #32621? It's not a bug fix. |
@eeckstein It was merged in to 5.3-20201012 branch - #34495 |
Ah sorry, it was actually a bug fix |
eeckstein
approved these changes
Nov 18, 2020
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.
lgtm
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.
Pull in changes from: