Skip to content

Keep certain function that are potentially used in the debugger #68843

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

augusto2112
Copy link
Contributor

Currently, when compiling with no optimizations on, we still delete
functions that are sometimes used in the debugger. For example, users
might want to call functions which are unused, or compiler generated
setters/getters.

rdar://101046198

@augusto2112
Copy link
Contributor Author

@swift-ci test

1 similar comment
@augusto2112
Copy link
Contributor Author

@swift-ci test

Currently, when compiling with no optimizations on, we still delete
functions that are sometimes used in the debugger. For example, users
might want to call functions which are unused, or compiler generated
setters/getters.

rdar://101046198
@augusto2112 augusto2112 force-pushed the keep-funcs-for-deb-tests branch from d359abb to 4e1ded4 Compare October 4, 2023 17:21
@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112 augusto2112 force-pushed the keep-funcs-for-deb-tests branch from 4e1ded4 to 4c89666 Compare October 4, 2023 23:11
@augusto2112
Copy link
Contributor Author

@swift-ci test

@augusto2112 augusto2112 marked this pull request as ready for review October 5, 2023 16:49
Copy link
Contributor

@nate-chandler nate-chandler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Now that we keep many more functions on unoptimized builds, many tests
need to be changed to either:
- Account for function that wasn't being emitted before to being emitted
  now.
- Account for functions that previously were being emitted lazily to
  being emitted eagerly now.
@augusto2112 augusto2112 force-pushed the keep-funcs-for-deb-tests branch from 4c89666 to 1c4b67a Compare October 6, 2023 18:08
@augusto2112
Copy link
Contributor Author

@swift-ci smoke test

@augusto2112 augusto2112 merged commit efc86aa into swiftlang:rebranch Oct 9, 2023
@eeckstein
Copy link
Contributor

@swift-ci benchmark

aschwaighofer added a commit to aschwaighofer/swift that referenced this pull request Oct 24, 2023
We don't support generating code for ptrauth builtins with generic
inputs (or non-constant inputs). We rely on specialization/inlining for
such code to work.

After a recent commit (swiftlang#68843 ) code in IRGen keeps internal unreferenced
functions alive for debugging purposes.

This is a problem for the generic functions in PtrAuth.swift using
ptrauth builtins.

Opt out of this new behavior by sprinkling some pixie dust.

Fixes debug swift standard library builds targeting arm64e.

rdar://117411740
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.

3 participants