Skip to content

[DebugInfo] Remove debug info from outlined async helper functions #75881

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

felipepiovezan
Copy link
Contributor

@felipepiovezan felipepiovezan commented Aug 14, 2024

rdar://133849022

These two commits remove debug information from the two pairs of functions:

  • __swift_async_resume_project_context and __swift_async_resume_get_context
  • async dispatch/suspend functions

From the commit message:

Those functions are effectively outlined functions with an alwaysinline
attribute. By removing their debug info and relying on the inliner to propagate
the call site location to the inlined instructions, we restore the "original"
locations as if the function had never been outlined.

This is technically relying on an implementation detail of the inliner, but it
seems to be the simplest way of addressing this issue.

Those functions are effectively outlined functions with an alwaysinline
attribute. By removing their debug info and relying on the inliner to propagate
the call site location to the inlined instructions, we restore the "original"
locations as if the function had never been outlined.

This is technically relying on an implementation detail of the inliner, but it
seems to be the simplest way of addressing this issue.
…r __swift_async_resume_get_context

Those functions are effectively outlined functions with an alwaysinline
attribute. By removing their debug info and relying on the inliner to propagate
the call site location to the inlined instructions, we restore the "original"
locations as if the function had never been outlined.

This is technically relying on an implementation detail of the inliner, but it
seems to be the simplest way of addressing this issue.
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.

2 participants