Skip to content

Don't delete allocations in DCE #73852

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 1 commit into from
May 23, 2024
Merged

Don't delete allocations in DCE #73852

merged 1 commit into from
May 23, 2024

Conversation

meg-gupta
Copy link
Contributor

DCE was deleting an allocation with only destroy_value users. This isn't correct when the deinit can have a side effect. This should be handled in DeadObjectElimination which does additional analysis on deinit to determine if a dead allocation can be eliminated.

@meg-gupta meg-gupta requested a review from atrick May 23, 2024 17:51
@meg-gupta
Copy link
Contributor Author

Fixes issue reported in #73768

@meg-gupta
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Could you add a comment and CHECK lines to the test?

@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test

@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test

@meg-gupta meg-gupta enabled auto-merge May 23, 2024 19:59
@meg-gupta meg-gupta merged commit 8b4469b into swiftlang:main May 23, 2024
3 checks passed
@turbolent
Copy link

Thank you for the quick fix @meg-gupta 🙏

@meg-gupta meg-gupta deleted the fixdce branch July 10, 2024 00:22
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.

3 participants