Improve code generation for arrays of classes. #76908
Merged
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.
classify_bridge_object
to(false, false)
if the operand is known to be a swift class.We already had this optimization in the SILCombiner. But it didn't handle all the cases. Now it's implemented as instruction simplification (in swift) using a ValueUseDefWalker.
Array._endMutation
.Pre-specialization of
Array._endMutation
(for AnyObject) prevents inlining this function and that results in sub-optimal code. This function is basically a no-op. So it should be inlined.Unfortunately we cannot remove the specialize-attributes anymore because the pre-specialized function(s) are now part of the stdlib's ABI. Therefore make an exception for
Array._endMutation
in the generic specializer.rdar://137243595