-
Notifications
You must be signed in to change notification settings - Fork 10.5k
SILGen: Skip emitting distributed thunks for skipped functions #68917
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
SILGen: Skip emitting distributed thunks for skipped functions #68917
Conversation
@swift-ci please smoke test |
// CHECK-SKIP-NONINLINE-LABEL: sil [serialized] [distributed] [ossa] @$s38distributed_thunk_skip_function_bodies2DAC13inlinableFuncyyF : $@convention(method) (@guaranteed DA) -> () { | ||
// CHECK-SKIP-NONINLINE: function_ref @$s38distributed_thunk_skip_function_bodies9blackHoleyyxlF | ||
// CHECK-SKIP-NONINLINE: } // end sil function '$s38distributed_thunk_skip_function_bodies2DAC13inlinableFuncyyF' | ||
@inlinable public distributed func inlinableFunc() { |
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.
Does an @inlinable distributed func
even make sense? I'm sort of surprised this is allowed.
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 that's okay because we inject an implicit if/else that either dispatches remove or goes though the local logic so inlining shouldn't break thunking but it would be good to add a test for that to make sure.
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.
Yeah it should be fine to inline distributed thunks, they're the if-remote-do-this code
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.
Thank you!
@swift-ci please test source compatibility debug |
Generalizes swiftlang#68917 to cover accessors in addition to methods. Resolves rdar://117226130
Follow up to #68760 to fix a failed assertion when building the
swift-distributed-actors
project.