Skip to content

Optimizer: some improvements for alias analysis in several utilities #75689

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 4 commits into from
Aug 6, 2024

Conversation

eeckstein
Copy link
Contributor

  • Handle destroy_value [dead_end] in AliasAnalylsis.computeMemoryEffect: We don't have to take deinit effects into account for a destroy_value [dead_end]. Such destroys are lowered to no-ops and will not call any deinit.
  • A small refactoring: use AccessBase.isLet instead of duplicating the code in MemoryLocation.isLetValue.
  • Handle more use types for unchecked_addr_cast in EscapeInfo.
  • Recognize addressor calls of globals as a "global" access base in AccessUtils.

We don't have to take deinit effects into acount for a `destroy_value [dead_end]`.
Such destroys are lowered to no-ops and will not call any deinit.
Handle `apply` and `try_apply`.
Also, improve test cases
…s base

Makes e.g. alias analysis more precise in the early stage of the pass pipeline where addressor calls are not inlined, yet.
@eeckstein eeckstein requested a review from jckarter as a code owner August 5, 2024 15:59
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein
Copy link
Contributor Author

@swift-ci benchmark

@eeckstein eeckstein merged commit d5d9338 into swiftlang:main Aug 6, 2024
6 checks passed
@eeckstein eeckstein deleted the alias-analysis-improvements branch August 6, 2024 05:11
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