Skip to content

[IRGen] Optimize Builtin.arrayDestroy when count is 1 #72636

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
merged 2 commits into from
Mar 28, 2024

Conversation

Azoy
Copy link
Contributor

@Azoy Azoy commented Mar 27, 2024

Instead of always doing a call to swift_arrayDestroy, we can call a type's specific destroy when count is known to statically be 1.

@Azoy Azoy requested a review from aschwaighofer March 27, 2024 21:03
@Azoy Azoy requested a review from a team as a code owner March 27, 2024 21:03
@Azoy
Copy link
Contributor Author

Azoy commented Mar 27, 2024

@swift-ci please smoke test

@Azoy Azoy merged commit 07eb52a into swiftlang:main Mar 28, 2024
@Azoy Azoy deleted the destroy-array-opt branch March 28, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant