-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Update guaranteed forwarding phi apis and verification #62454
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
Update guaranteed forwarding phi apis and verification #62454
Conversation
4bc29a9
to
9b57f51
Compare
@swift-ci test |
9b57f51
to
85e456b
Compare
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically LGTM. Thanks.
If you make another round of changes, then I should merge this first
#62493
return false; | ||
// NOTE: canOpcodeForwardInnerGuaranteedValues returns true for transformation | ||
// terminator results. | ||
if (canOpcodeForwardInnerGuaranteedValues(value) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope we can have a reborrow vs. forwarding flag on the phi soon so we don't need this distinction between "inner" guaranteed values and other guaranteed values! Then I don't think we need this logic.
@@ -623,6 +625,38 @@ bool SILValueOwnershipChecker::isSubobjectProjectionWithLifetimeEndingUses( | |||
}); | |||
} | |||
|
|||
bool SILValueOwnershipChecker:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this verification. If we had a reborrow phi flag, then then we wouldn't need any transitive verification at all.
Use OperandOwnership::GuaranteedForwarding instead.
…d forwarding operands on all paths
85e456b
to
35d45de
Compare
@swift-ci test and merge |
isGuaranteedForwardingPhi
and updateisGuaranteedForwarding
OperandOwnership::GuaranteedForwardingPhi
, and update uses toOperandOwnership::GuaranteedForwarding