-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[silcombine] (store (struct_gep addr) value) -> (store addr (struct v… #21791
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
[silcombine] (store (struct_gep addr) value) -> (store addr (struct v… #21791
Conversation
@swift-ci test |
98f033a
to
632ddd5
Compare
As an observer, can I ask why the new pattern is better than the old one? |
@jrose-apple Semantically the two are equivalent. The difference is that at an optimizer level it is easier to promote from further up the type tree to a lower level of the type tree vs promoting from a lower level of the type tree to an upper level of the type tree. Generally the former is possible and the other is not. This PR changes the only case where it is possible to promote an available value of field in a type tree to an available value of the parent type (namely where one where all of the struct fields are single element) to one that most passes handle, the other. |
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.
LGTM
Thanks for the explanation! |
632ddd5
to
556001a
Compare
…alue)) for single field structs.
556001a
to
cf43a93
Compare
@swift-ci smoke test |
…alue)) for single field structs.