Skip to content

IRGen: Inhibit alloc_stack hoisting in the presence of has_symbol instructions #62332

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

tshortli
Copy link
Contributor

@tshortli tshortli commented Dec 1, 2022

if #_hasSymbol(...) conditionals are used to prevent use of weakly linked symbols when they are not available. Therefore optimization needs to treat these conditionals similarly to if #available(..) conditionals and inhibit optimizations like alloc_stack hoisting.

Resolves rdar://102837282

@tshortli
Copy link
Contributor Author

tshortli commented Dec 1, 2022

@swift-ci please test

Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

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

LGTM

@tshortli tshortli merged commit 8c03ace into swiftlang:main Dec 1, 2022
@tshortli tshortli deleted the has-symbol-inhibit-alloc-stack-hoist branch December 1, 2022 16:49
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