[Wasm RyuJit] multi entry try preliminaries#126327
Open
AndyAyersMS wants to merge 7 commits intodotnet:mainfrom
Open
[Wasm RyuJit] multi entry try preliminaries#126327AndyAyersMS wants to merge 7 commits intodotnet:mainfrom
AndyAyersMS wants to merge 7 commits intodotnet:mainfrom
Conversation
…ted. But looks like we need fake pred edges
Member
Author
|
PTAL @dotnet/jit-contrib |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Contributor
There was a problem hiding this comment.
Pull request overview
Prep work in CoreCLR JIT for handling (and currently detecting/bailing on) multi-entry try regions during Wasm control-flow restructuring.
Changes:
- Extend
FlowGraphTryRegions/FlowGraphTryRegionto optionally operate without a DFS, track try blocks via bitvectors, and record try-entry edges / side-entry status. - Mark Wasm EH dispatch switch blocks as
BBF_CATCH_RESUMPTIONand bail out of Wasm control flow when multi-entry try regions are detected. - Relax EH predecessor diagnostics on Wasm to tolerate catch-resumption edges into the middle of
tryregions (transiently during restructuring).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/jit/flowgraph.cpp | Builds try-region descriptors using DFS or bbNum indexing; records entry edges and flags side-entry/multi-entry tries; updates dump output. |
| src/coreclr/jit/fgwasm.cpp | Uses try-region info to NYI on multi-entry tries; marks dispatch switch blocks as catch resumptions; adjusts EH-flow handling. |
| src/coreclr/jit/fgdiagnostic.cpp | Allows (Wasm) catch-resumption edges to enter try blocks mid-region during restructuring. |
| src/coreclr/jit/compiler.hpp | Asserts RPO enumeration is only used when a DFS is available; updates bitvector trait usage. |
| src/coreclr/jit/compiler.h | Adds entry-edge tracking and multi-entry try tracking; stores compiler pointer/traits; adds Wasm state flags. |
| src/coreclr/jit/block.h | Introduces BBF_CATCH_RESUMPTION basic-block flag. |
This was referenced Mar 31, 2026
jakobbotsch
reviewed
Mar 31, 2026
Comment on lines
+2762
to
+2765
| // Catch resumptions are allowed to jump into try blocks at any point. | ||
| // They are transients during Wasm control flow restructuring. | ||
| // TODO: revoke after SCC | ||
| if (m_compiler->fgWasmHasCatchResumptions && blockPred->HasFlag(BBF_CATCH_RESUMPTION)) |
Member
There was a problem hiding this comment.
What is meant by a "catch resumption"?
jakobbotsch
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prep work for handling multi-entry try regions in Wasm targeting.