-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[sil-ownership] Tighten up the verification of guaranteed phi arguments. #19173
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
[sil-ownership] Tighten up the verification of guaranteed phi arguments. #19173
Conversation
|
@swift-ci test |
|
The other PR is #19131 |
|
Build failed |
Now we properly enforce that all guaranteed phi arguments's lifetime is completely enclosed by the lifetimes of the phi argument's inputs. This is implemented by inserting an "implicit" regular use into the use stream of the phi argument's inputs. This is nice since it ensures that when we are verifying ownership of a specific argument, we will not walk through all subarguments... instead we just need to verify that the end_borrow is completely enclosed within the lifetime of the input guaranteed value. I also fixed a case where we were bailing early out of the SIL Ownership Verifier causing us to emit an incorrect error. This error would only occur if we already diagnosed an error. I also re-added all of the tests that I removed when I replaced end_borrow_argument with end_borrow. rdar://33440767
a49a829 to
42498ad
Compare
|
@swift-ci test |
1 similar comment
|
@swift-ci test |
|
Build failed |
|
Build failed |
|
Was an lldb build failure. Not related to my change. Retesting! |
|
@swift-ci test |
|
@atrick Lets do post-commit review. I want to land this so I can finish splitting the ownership verifier into two so we can classify operand's acceptable ownership statically. |
Now we properly enforce that all guaranteed phi arguments's lifetime is
completely enclosed by the lifetimes of the phi argument's inputs. This is
implemented by inserting an "implicit" regular use into the use stream of the
phi argument's inputs. This is nice since it ensures that when we are verifying
ownership of a specific argument, we will not walk through all
subarguments... instead we just need to verify that the end_borrow is completely
enclosed within the lifetime of the input guaranteed value.
I also fixed a case where we were bailing early out of the SIL Ownership
Verifier causing us to emit an incorrect error. This error would only occur if
we already diagnosed an error.
I also re-added all of the tests that I removed when I replaced
end_borrow_argument with end_borrow.
rdar://33440767