Skip to content

BooleanLiteralFolding: remove dead blocks #71339

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 1 commit into from
Feb 5, 2024

Conversation

eeckstein
Copy link
Contributor

@eeckstein eeckstein commented Feb 2, 2024

Remove all dead blocks which are a result of constant folding conditional branches

@eeckstein
Copy link
Contributor Author

@swift-ci test

@asl
Copy link
Contributor

asl commented Feb 2, 2024

Great, thanks! Will check tomorrow on my testcases.

Remove all dead blocks which are a result of constant folding condition branches
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein requested a review from kavon February 2, 2024 10:47
@eeckstein
Copy link
Contributor Author

@kavon Can you please check if the change in the discard_checking testfile looks good? IMO it makes sense, because the discard is in dead code and the compiler is now "smart enough" to detect this.

@asl
Copy link
Contributor

asl commented Feb 2, 2024

This looks ok to me! Autodiff is more robust wrt unreachable blocks as in #71356 Though I'm not sure it covers 100% of cases :)

@eeckstein eeckstein merged commit e0853ff into swiftlang:main Feb 5, 2024
@eeckstein eeckstein deleted the remove-dead-blocks branch February 5, 2024 08:09
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