Skip to content

[Mem2Reg] RAUW undef lexical lifetime phis. #39839

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

Conversation

nate-chandler
Copy link
Contributor

Previously, if it was determined that a proactive phi was unnecessary, it was removed, along with the phis for the lifetime and the original value of which the proactive phi was a copy. The uses of only one of the three phis (namely, the proactive phi) was RAUW undef. In the case where the only usage of the phi was to branch back to the block that took the phi as an argument, that was a problem. Here, that is fixed by giving all three phis the same treatment. To avoid duplicating code, that treatment is pulled out into a new lambda.

This was exposed by adding lifetime versions of some OSSA versions of mem2reg tests that had been missed previously.

Previously, if it was determined that a proactive phi was unnecessary,
it was removed, along with the phis for the lifetime and the original
value of which the proactive phi was a copy.  The uses of only one of
the three phis (namely, the proactive phi) was RAUW undef.  In the case
where the only usage of the phi was to branch back to the block that
took the phi as an argument, that was a problem.  Here, that is fixed by
giving all three phis the same treatment.  To avoid duplicating code,
that treatment is pulled out into a new lambda.

This was exposed by adding lifetime versions of some OSSA versions of
mem2reg tests that had been missed previously.
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test windows platform

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

@nate-chandler nate-chandler merged commit 713f9b7 into swiftlang:main Oct 22, 2021
@nate-chandler nate-chandler deleted the lexical_lifetimes/rauw-all-three-phis-if-proactive-phi-is-unnecessary branch October 22, 2021 03:19
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