Skip to content

[6.0] MandatoryPerformanceOptimizations: prevent inlining of dynamic-self class methods #74678

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
merged 2 commits into from
Jun 26, 2024

Conversation

eeckstein
Copy link
Contributor

  • Explanation: This fixes a compiler crash in embedded swift. When a static/global variable is initialized with a class where the initializer uses dynamic Self the MandatoryPerformanceOptimizations crashed while trying to inline the initializer. Such initializer must not be inlined, because the caller (= the global-init function) cannot provide the dynamic-self metadata.
  • Scope: Only affects embedded swift.
  • Risk: very low. The change prevents inlining for some functions, which are not required to be inlined, anyway.
  • Testing: Tested by a test case
  • Issue: rdar://129241915
  • Reviewer: @kubamracek
  • Main branch PR: MandatoryPerformanceOptimizations: prevent inlining of dynamic-self class methods #74657

@eeckstein eeckstein requested a review from a team as a code owner June 25, 2024 08:55
@eeckstein eeckstein requested a review from kubamracek June 25, 2024 08:55
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein force-pushed the fix-mandatory-perf-opt-6.0 branch from 75a9d8a to 76e3f07 Compare June 25, 2024 14:52
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein merged commit f5de520 into swiftlang:release/6.0 Jun 26, 2024
5 checks passed
@eeckstein eeckstein deleted the fix-mandatory-perf-opt-6.0 branch June 26, 2024 06:42
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