Skip to content

[sil] Tighten up SIL verification around when checked_cast_br should/… #22503

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

Conversation

gottesmm
Copy link
Contributor

…shouldn't have failure arguments.

checked_cast_br in ownership SIL funnels through the original value to the
failure block as a SILArgument for cleanup purposes. In contrast, when SIL is
not in ossa, we do not want the failure bb case to have any arguments since that
is the pattern that SILOptimizer passes expect.

This commit just formalizes these constraints into the SILVerifier to catch
mistakes.

…shouldn't have failure arguments.

checked_cast_br in ownership SIL funnels through the original value to the
failure block as a SILArgument for cleanup purposes. In contrast, when SIL is
not in ossa, we do not want the failure bb case to have any arguments since that
is the pattern that SILOptimizer passes expect.

This commit just formalizes these constraints into the SILVerifier to catch
mistakes.
@gottesmm gottesmm requested a review from shajrawi February 11, 2019 05:59
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

Going to run this through a test and then a source compatibility run (just in case).

@gottesmm
Copy link
Contributor Author

@swift-ci test source compatibility

@gottesmm gottesmm merged commit 98e3f04 into swiftlang:master Feb 11, 2019
@gottesmm gottesmm deleted the pr-b879a0f3a55c6131ff071337356f4fd4bf7c955f branch February 11, 2019 19:16
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