-
Notifications
You must be signed in to change notification settings - Fork 10.5k
WIP: Closure ABI - Make @noescape Swift closures trivial #14514
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
WIP: Closure ABI - Make @noescape Swift closures trivial #14514
Conversation
@swift-ci Please test |
@swift-ci Please test source compatibility |
@swift-ci Please benchmark |
Build failed |
Build comment file:Optimized (O)Regression (25)
Improvement (10)
No Changes (327)
Unoptimized (Onone)Regression (10)
Improvement (28)
No Changes (324)
Hardware Overview
|
- @NoEscape functions are trivial types That makes @NoEscape functions incompatible with escaping functions. - Forward ownership of mark_dependence %3 : callee_guaranteed () -> () on %0 : noescape @callee_guaranteed () -> () - SIL: Add ABIEscapeToNoEscapeConversion to SILFunctionType::ABICompatibilityCheckResult - SIL: A thin_to_thick_function with a @NoEscape result type has trivial ownership - SIL: thin_to_thick_function can create noescape function types Part of: SR-5441 rdar://36116691
- Emit a withoutActuallyEscapingClosure partial apply This is to convert an @NoEscape closure to an escaping closure. This needs to be done in preparation of @NoEscape closure contexts becoming trivial. - Insert escaping to noescape conversions - Fix SILGen for @NoEscape - Postpone closure cleanups to outside the argument scope - Apply postponement recursively for closures passed to subscripts - Only skip applying escapeness conversions for Swift thick functions - Fix parameter convention for noescape closures in thunks Part of: SR-5441 rdar://36116691
… of partial_apply
We should not need those -- except (at least) for functions passed as arguments to materializeForSet ...
- also combine thin_to_thick_function and convert_escape_to_noescape
It can't be moved because there are pointers to it
a7918cc
to
025a8b9
Compare
@swift-ci Please test |
@swift-ci Please test source compatibility |
@swift-ci Please benchmark |
@swift-ci Please test |
Build failed |
Build failed |
The benchmark run for the simply_cfg addition is here: https://ci.swift.org/view/Pull%20Request/job/swift-PR-osx-perf/138/ |
We can treat a throw instruction like we would a return. Insert the release for the propagated partial_apply before the throw instruction.
@swift-ci Please test |
Build failed |
@swift-ci Please test source compatibility |
@swift-ci Please benchmark |
Build failed |
Latest benchmark: https://ci.swift.org/view/Pull%20Request/job/swift-PR-osx-perf/139 |
Latest source compat: https://ci.swift.org/view/Pull%20Request/job/swift-PR-source-compat-suite/758/console |
Build comment file:Optimized (O)Regression (14)
Improvement (10)
No Changes (338)
Unoptimized (Onone)Regression (16)
Improvement (47)
No Changes (299)
Hardware Overview
|
@swift-ci Please benchmark |
Build comment file:Optimized (O)Regression (14)
Improvement (8)
No Changes (340)
Unoptimized (Onone)Regression (4)
Improvement (37)
No Changes (321)
Hardware Overview
|
SR-5441
rdar://36116691