Skip to content
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

Assert at the end of the Register Allocation Phase that the numbers of Start and End internal control flow labels were equal #7597

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hzongaro
Copy link
Contributor

If the number of Start internal control flow labels does not equal the number of End internal control flow labels, the result might be subtle intermittent problems related to register allocation.

This change adds an assertion that, at the completion of the Register Allocation Phase, the register allocator must not indicate that it's still nested within a region of internal control flow nor popped out of too many regions of internal control flow.

If the number of Start internal control flow labels does not equal the
number of End internal control flow labels, the result might be subtle
intermittent problems related to register allocation.

This change adds an assertion that, at the completion of the Register
Allocation Phase, the register allocator must not indicate that it's
still nested within a region of internal control flow nor popped out of
too many regions of internal control flow.

Signed-off-by:  Henry Zongaro <[email protected]>
@hzongaro
Copy link
Contributor Author

I have started running testing on this change with a downstream project to determine whether it uncovers any cases where Start and End internal control flow labels are mismatched. Those instances ought to be corrected before this change is merged to avoid breaking downstream projects.

It could also be that there are cases where it really is permissible to have more or fewer Start internal control flow labels than End labels. If that is the case, this pull request might need to be revised or abandoned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant