Skip to content

Fix two optimizer issues #79841

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 8, 2025
Merged

Fix two optimizer issues #79841

merged 2 commits into from
Mar 8, 2025

Conversation

meg-gupta
Copy link
Contributor

@meg-gupta meg-gupta commented Mar 7, 2025

Fixes rdar://146142041

@meg-gupta meg-gupta requested a review from eeckstein as a code owner March 7, 2025 17:37
@meg-gupta meg-gupta requested review from atrick, eeckstein and nate-chandler and removed request for eeckstein March 7, 2025 17:38
@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta meg-gupta changed the title Bailout of CopyValueOpts when there is a pointer escape Fix two optimizer issues Mar 7, 2025
Copy link
Contributor

@nate-chandler nate-chandler left a comment

Choose a reason for hiding this comment

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

lgtm

Copy propagation does these optimizations more generally. It should be
able to replace this optimization. Fixing it and not just deleting CopyValueOpts
because it happens to be called in the mandatory pipeline.
Otherwise, DestroyHoisting attemps to compute interior liveness
and inserts destoys at the ends. CanonicalizeOSSALifetimes is
designed to do this and not DestroyHoisting.
@meg-gupta
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

lgtm

@meg-gupta meg-gupta enabled auto-merge March 7, 2025 19:10
@meg-gupta meg-gupta merged commit b6b4a7b into swiftlang:main Mar 8, 2025
4 of 5 checks passed
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