Skip to content

[ownership] Add a DeadEndBlocksAnalysis that vends/saves DeadEndBlocks in between passes. #35477

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

gottesmm
Copy link
Contributor

Importantly this also lets us use the analysis framework to validate that we do
properly invalidate DeadEndBlocks, preventing bugs.

I did not thread this all over the compiler. Instead I just used it for now in
SemanticARCOpts just to add some coverage without threading it into too many
places.

…s in between passes.

Importantly this also lets us use the analysis framework to validate that we do
properly invalidate DeadEndBlocks, preventing bugs.

I did not thread this all over the compiler. Instead I just used it for now in
SemanticARCOpts just to add some coverage without threading it into too many
places.
@gottesmm gottesmm requested review from atrick and meg-gupta January 18, 2021 23:23
@gottesmm
Copy link
Contributor Author

The reason why I didn't thread it further is I am a little worried that it may expose more bugs than I want to fix in this PR X ).

@gottesmm
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

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

cool

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 4a71042

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test macOS platform

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test OS X platform

@gottesmm gottesmm merged commit 5938a67 into swiftlang:main Jan 19, 2021
@gottesmm gottesmm deleted the pr-09967e42af2f24bfb4d3114846f057222407cff4 branch January 19, 2021 03:08
@meg-gupta
Copy link
Contributor

thanks! lgtm

@eeckstein
Copy link
Contributor

@gottesmm post-merge review: Can you make the SetVector DeadEndBlocks::ReachableBlocks into a SmallPtrSet? A vector is only used as wordlist in the compute function. Especially when this is an analysis, which may be kept alive for a longer time, it doesn't make sense to store the vector.

Also, are you planning to replace all occurrences of DeadEndBlocks with the analysis? If not (in the near future), can you add a comment for the DeadEndBlocks class, where you mention that one should better use the analysis?

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.

5 participants