-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Start using the best resilience expansion in SIL #23170
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
Start using the best resilience expansion in SIL #23170
Conversation
4152571
to
13f76bd
Compare
@swift-ci Please benchmark |
@swift-ci Please test source compatibility |
@swift-ci Please test |
Performance: -O
Performance: -Osize
Performance: -Onone
Code size: -swiftlibs
How to read the dataThe tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.If you see any unexpected regressions, you should consider fixing the Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
Build failed |
Build failed |
13f76bd
to
b69c6b9
Compare
b69c6b9
to
89f5287
Compare
89f5287
to
d7c7ead
Compare
// CHECK: return [[RESULT]] : $() | ||
|
||
// CHECK-LABEL: sil @$s4test26cannotConvertToValueUseAltyyF : $@convention(thin) () -> () | ||
// CHECK: [[TMP:%.*]] = alloc_stack $ResilientStruct |
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 would like at least a FIXME here.
FIXME: The optimizer should easily eliminate this copy. The problem is that copy forwarding assumes that address-only types are always explicitly destroyed.
d7c7ead
to
f168c00
Compare
f168c00
to
eef3b22
Compare
This is a large patch; I couldn't split it up further while still keeping things working. There are four things being changed at once here: - Places that call SILType::isAddressOnly()/isLoadable() now call the SILFunction overload and not the SILModule one. - SILFunction's overloads of getTypeLowering() and getLoweredType() now pass the function's resilience expansion down, instead of hardcoding ResilienceExpansion::Minimal. - Various other places with '// FIXME: Expansion' now use a better resilience expansion. - A few tests were updated to reflect SILGen's improved code generation, and some new tests are added to cover more code paths that previously were uncovered and only manifested themselves as standard library build failures while I was working on this change.
… a SILModule Finally we can remove the old overloads.
eef3b22
to
d069cc4
Compare
@swift-ci Please smoke test |
@swift-ci Please test source compatibility |
Follow-up to #23263.
Finally start using the best resilience expansion in SIL type lowering.
Completes rdar://problem/24057844, https://bugs.swift.org/browse/SR-261.