Uh oh!
There was an error while loading. Please reload this page.
[Wasm/RyuJit] treat all try side-entries as try entries for throw helpers - #130153
Conversation
…pers For Wasm DFS in graphs where try regions may have side entries (async), ensure the DFS will always eagerly visit (and first hence retreat from) any throw helper\ blocks in the region no matter which entry is visited first by DFS. This ensures the throw helper ends up last in the RPO, and hence is reachable by a forward branch from anywhere in the region.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
There was a problem hiding this comment.
Pull request overview
Adjusts Wasm-specific DFS successor enumeration so throw-helper (ACD) blocks are treated as successors not only from try headers, but also from “side-entry” blocks into a try region (e.g., async/catch resumption targets). This helps ensure throw helpers are visited early in DFS and end up late in RPO, enabling forward-branch reachability within the region.
Changes:
- Introduces a local predicate to classify “generalized try entries” (try header or side-entry).
- Uses this predicate when injecting ACD throw-helper successors during Wasm successor enumeration.
Uh oh!
There was an error while loading. Please reload this page.
AndyAyersMS
commented
Jul 3, 2026
Fixes this error where the throw helper ends up earlier in wasm ordering than one of its targets: Note we don't generally have flow edges to throw helpers. @jakobbotsch PTAL |
Uh oh!
There was an error while loading. Please reload this page.
…pers (#130153) For Wasm DFS in graphs where try regions may have side entries (async), ensure the DFS will always eagerly visit (and hence first retreat from) any throw helper blocks in the region, no matter which entry is visited first by DFS. This ensures the throw helper ends up last in the RPO and hence is reachable by a forward branch from anywhere in the region.
…d regions If an enclosed try region has a side entry (say from an async resume), add edges to (eagerly visit) the helper blocks in this region and in all enclosing try regions, so that the throw helpers end up being placed after any blocks in the respective regions. This generalizes the fix from dotnet#130153.
…d regions (#130945) If an enclosed try region has a side entry (say from an async resume), add edges to (eagerly visit) the helper blocks in this region and in all enclosing try regions, so that the throw helpers end up being placed after any blocks in their respective regions. This generalizes the fix from #130153.
…d regions If an enclosed try region has a side entry (say from an async resume), add edges to (eagerly visit) the helper blocks in this region and in all enclosing try regions, so that the throw helpers end up being placed after any blocks in the respective regions. This generalizes the fix from dotnet#130153.
For Wasm DFS in graphs where try regions may have side entries (async), ensure the DFS will always eagerly visit (and hence first retreat from) any throw helper blocks in the region, no matter which entry is visited first by DFS.
This ensures the throw helper ends up last in the RPO and hence is reachable by a forward branch from anywhere in the region.