Skip to content

IRGen: Use the current function name for the swift_suspend_dispatch thunk #41645

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

Merged

Conversation

aschwaighofer
Copy link
Contributor

This is an incremental improvement of the debug info at a suspend apply site.

Before this patch the debug info at the call site would use the
__swift_suspend_dispatch function name as the current function after
coro lowering has inlined the thunk.

The proper fix is to rewire the debug info such that the thunk name is
never mentioned rather the current function that suspend site sits in is
used.

Until I have figured out how to do that using the current function name
instead of __swift_suspend_dispatch.5 for the thunk is an incremental
improvement in the debug information consumers can observe.

rdar://88579737

…hunk

This is an incremental improvement of the debug info at a suspend apply site.

Before this patch the debug info at the call site would use the
`__swift_suspend_dispatch` function name as the current function after
coro lowering has inlined the thunk.

The proper fix is to rewire the debug info such that the thunk name is
never mentioned rather the current function that suspend site sits in is
used.

Until I have figured out how to do that using the current function name
instead of `__swift_suspend_dispatch.5` for the thunk is an incremental
improvement in the debug information consumers can observe.

rdar://88579737
@aschwaighofer
Copy link
Contributor Author

@swift-ci test

@aschwaighofer aschwaighofer merged commit 88c79a4 into swiftlang:main Mar 3, 2022
aschwaighofer added a commit to aschwaighofer/swift that referenced this pull request Mar 3, 2022
…ion for async suspend dispatch thunks

Improvement upon swiftlang#41645 to emit the async suspend dispatch thunk's debug
info with the `linkageName` of the containing function of the async
await.

rdar://88579737
aschwaighofer added a commit to aschwaighofer/swift that referenced this pull request Apr 20, 2022
…t thunk

This is an incremental improvement of the debug info at a
(hop_to_executor) suspend site.

Before this patch the debug info at the call site would use the
`__swift_suspend_point` function name as the current function after
coro lowering has inlined the thunk.

The proper fix is to rewire the debug info such that the thunk name is
never mentioned rather the current function that suspend site sits in is
used.

Until I have figured out how to do that using the current function name
instead of `__swift_suspend_point` for the thunk is an incremental
improvement in the debug information consumers can observe.

rdar://90859530

This is the same approach as we took for the await suspend points (vs.
hop to executor in this patch) in the PR swiftlang#41645.

Risk is very low, only a function name of a function that is guaranteed
to be inlined during coroutine splitting is changed.
aschwaighofer added a commit to aschwaighofer/swift that referenced this pull request Apr 20, 2022
…pend_point thunk

This is an incremental improvement of the debug info at a
(hop_to_executor) suspend site.

Before this patch the debug info at the call site would use the
`__swift_suspend_point` function name as the current function after
coro lowering has inlined the thunk.

The proper fix is to rewire the debug info such that the thunk name is
never mentioned rather the current function that suspend site sits in is
used.

Until I have figured out how to do that using the current function name
instead of `__swift_suspend_point` for the thunk is an incremental
improvement in the debug information consumers can observe.

rdar://90859530

This is the same approach as we took for the await suspend points (vs.
hop to executor in this patch) in the PR swiftlang#41645.

Risk is very low, only a function name of a function that is guaranteed
to be inlined during coroutine splitting is changed.

Matching `main` PR: swiftlang#42454
Matching `release/5.7` PR: swiftlang#42481
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant