-
Notifications
You must be signed in to change notification settings - Fork 10.5k
SR-10294: convertBoolToDarwinBool and friends should be inlined #23802
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
Conversation
@swift-ci please smoke benchmark |
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
|
@swift-ci please smoke 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.
It looks good to me, but it'd be nice to know what changed in the optimized build benchmarks.
@@ -27,26 +27,30 @@ import _SwiftObjectiveCOverlayShims | |||
public struct ObjCBool : ExpressibleByBooleanLiteral { | |||
#if os(macOS) || (os(iOS) && (arch(i386) || arch(arm))) | |||
// On OS X and 32-bit iOS, Objective-C's BOOL type is a "signed char". | |||
var _value: Int8 | |||
@usableFromInline var _value: Int8 |
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.
This is technically cheating because this wasn't ABI in 5.0 and therefore there wasn't a symbol there, so we have to really cross our fingers that nothing will stay referencing the symbol. That seems pretty likely, though.
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.
Ah hm good point >.<
What about at -Onone? Seems like there’s more risk there maybe?
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 think since the struct is fixed-layout it should be okay. It's still usable-from-inline and not public so it's not like it can be used in arbitrary ways.
I think the benchmark regressions are noise. Most of them are ‘?’ and I would be surprised if most of them use DarwinBool at all; it’s not real common. |
Yes, but you've got ObjCBool in there too, which is a little more common. (Still seems unlikely, but…) |
f0c9923
to
2ebfe98
Compare
@swift-ci please smoke test |
@swift-ci please smoke benchmark |
No performance and code size changes |
Intriguing. |
Looks like we don't get to do this until the compiler crash is fixed |
I mean, that's not too surprising to me. Our benchmarks mostly aren't trafficking in ObjCBool anyway, and I'm sure none of them are testing DarwinBoolean. |
Blocking bug was fixed |
2ebfe98
to
cc202b1
Compare
@swift-ci please smoke test |
@swift-ci please smoke benchmark |
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
|
@swift-ci please smoke test |
Dammit, accidentally got another branch mixed in there >.< |
7f5fb02
to
ca5e554
Compare
@swift-ci please smoke test |
1 similar comment
@swift-ci please smoke test |
Yaaay tests passed |
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. DarwinBoolean.== could probably also be transparent, but I'm not sure that it matters much.
ca5e554
to
7db8cb1
Compare
@swift-ci please smoke test and merge |
4 similar comments
@swift-ci please smoke test and merge |
@swift-ci please smoke test and merge |
@swift-ci please smoke test and merge |
@swift-ci please smoke test and merge |
Fixes rdar://problem/49926079