-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[4.1][sil] When expanding aggregate instructions, do so consistently based… #14163
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
[4.1][sil] When expanding aggregate instructions, do so consistently based… #14163
Conversation
a4e30df
to
6ca0f7a
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.
include/swift/SIL/TypeLowering.h: static TypeExpansionKind getLoweringStyle(bool shouldExpand) {
is no longer used after this change, can you please remove said function? Otherwise LGTM!
Explanation: This commit ensures that when we canonicalize aggregate ARC operations on large structs, we do so consistently no matter the ARC operation that is used. |
@shajrawi, @eeckstein asked me to make this as small as possible. I would rather just leave it in. |
Actually, I am going to come up with a test for the actual ARC failure as well for this PR. So I guess I can go through another test cycle. |
… off the code-size hueristic. We were expanding retain_value, release_value properly, but not copy_addr/destroy_addr. This caused ARC invariants to break resulting in miscompiles. rdar://36509461
6ca0f7a
to
c52011a
Compare
@swift-ci test |
@swift-ci test |
@shahmishal Is something wrong here? Or am I being impatient? |
nm. The bots are being upgraded. |
Build failed |
@swift-ci test |
Please wait for CI to catch up. |
Build failed |
Build failed |
Sorry for being so impatient Mishal! |
… off the code-size hueristic.
We were expanding retain_value, release_value properly, but not
copy_addr/destroy_addr. This caused ARC invariants to break resulting in
miscompiles.
rdar://36509461