Skip to content

Conversation

@amanasifkhalid
Copy link
Contributor

When trying to create fallthrough for a jump that begins after an EH region, and ends before the EH region, don't consider a split point within the EH region; otherwise, the swap will break the invariant that EH entries are not moved relative to other blocks in the region. Fixes #111347.

@amanasifkhalid
Copy link
Contributor Author

amanasifkhalid commented Jan 21, 2025

cc @dotnet/jit-contrib, @AndyAyersMS PTAL. Handful of diffs; it looks like there were many cases where we were temporarily moving EH region entries during 4-opt to get the "best" cut point, and then fixing up the region entry's placement in a later move, though we currently don't make any guarantees that that future move will happen, so this fix seems appropriate for now. If we have time for it later, I'll consider relaxing this restriction around not moving EH region entries by making the post-layout fixup logic more powerful.

@amanasifkhalid amanasifkhalid merged commit 55a4602 into dotnet:main Jan 21, 2025
105 of 109 checks passed
@amanasifkhalid amanasifkhalid deleted the fix-3-opt-eh-start branch January 21, 2025 18:10
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assertion failed 'HBtab->ebdTryBeg == block' during 'Optimize layout'

2 participants