Skip to content

JIT: handle nested try case in empty try removal#111129

Merged
AndyAyersMS merged 2 commits into
dotnet:mainfrom
AndyAyersMS:Fix110958
Jan 7, 2025
Merged

JIT: handle nested try case in empty try removal#111129
AndyAyersMS merged 2 commits into
dotnet:mainfrom
AndyAyersMS:Fix110958

Conversation

@AndyAyersMS

Copy link
Copy Markdown
Member

When we remove a try region, the try entry block may still be a try entry for enclosing try regions, so we can't unconditionally drop the DONT_REMOVE flag.

Fixes #110958

When we remove a try region, the try entry block may still be a try entry
for enclosing try regions, so we can't unconditionally drop the DONT_REMOVE flag.

Fixes dotnet#110958
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 6, 2025
@AndyAyersMS

Copy link
Copy Markdown
Member Author

@amanasifkhalid PTAL
cc @dotnet/jit-contrib

@amanasifkhalid amanasifkhalid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

Comment thread src/coreclr/jit/fgehopt.cpp Outdated
@BruceForstall

Copy link
Copy Markdown
Contributor

fwiw, #82336

@AndyAyersMS

AndyAyersMS commented Jan 7, 2025

Copy link
Copy Markdown
Member Author

fwiw, #82336

What I was hoping to get to someday was to have all block references be enumerable from the block -- most would be from flow edges like with our current pred lists, but we'd have some special references from the EH table, statics on the compiler object (eg fgFirstBB), and similar.

@AndyAyersMS AndyAyersMS merged commit c5df73f into dotnet:main Jan 7, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 6, 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->HasFlag(BBF_DONT_REMOVE)' during 'Remove empty try-catch-fault 2/3

3 participants