Skip to content

[5.9] Disable TempRValueOpt when there are users of the temp object preceding the copy #66342

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
Jun 5, 2023

Conversation

meg-gupta
Copy link
Contributor

Explanation: TempRValueOpt did not check if the temp obj has any users before its initializing copy before optimizing it away. This can happen with projection users. Doing so, led to invalid SIL because of use before def after the optimization.

Scope: Narrow; Disabled TempRValueOpt on an edgecase, without it, the compiler would have crashed anyway in IRGen.
Risk: Low; Disabling an edge case, do not expect to have any associated risk.
Reviewed by: @atrick @nate-chandler
Issue: rdar://108361427
Original pull request: #66328

@meg-gupta meg-gupta requested a review from a team as a code owner June 5, 2023 17:02
@meg-gupta meg-gupta changed the title Disable TempRValueOpt when there are users of the temp object preceding the copy [5.9] Disable TempRValueOpt when there are users of the temp object preceding the copy Jun 5, 2023
@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta meg-gupta merged commit 3798be2 into swiftlang:release/5.9 Jun 5, 2023
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