Skip to content

Fixes to ClosureLifetimeFixup's copy elimination for noncopyable values #74768

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
Jun 28, 2024

Conversation

meg-gupta
Copy link
Contributor

@meg-gupta meg-gupta commented Jun 27, 2024

  • On finding unrecognized user, reset initialization of the stack so that we
    don't inadvertently eliminate copy
  • For a mark_dependence user of the stack, look through the mark_dependence chain
    to match the partial_apply

On finding unrecognized user, reset `initialization` of the stack so that we
don't inadvertently eliminate copy
@meg-gupta meg-gupta requested a review from jckarter June 27, 2024 10:00
@meg-gupta meg-gupta requested a review from kavon as a code owner June 27, 2024 10:00
@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test

@meg-gupta meg-gupta requested a review from atrick June 27, 2024 10:24
@Azoy
Copy link
Contributor

Azoy commented Jun 27, 2024

Isn’t the latter resolved by: #74593?

@meg-gupta
Copy link
Contributor Author

@Azoy #74593 did not handle cases like testMultiCapture where markDepChain was not initialized because the capture was a copyable type.

For a mark_dependence user of the stack, look through the mark_dependence chain
to match the partial_apply.

Since this is a superset of the `markDepChain` logic, remove that.
So that we don't have 2 ways to check for the same.
@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test

@meg-gupta
Copy link
Contributor Author

@swift-ci test windows platform

@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test Linux platform

@meg-gupta meg-gupta merged commit e4566c8 into swiftlang:main Jun 28, 2024
3 checks passed
@meg-gupta meg-gupta deleted the clffix 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.

2 participants