Open
Conversation
- Rename `AsyncLiveness` -> `AsyncAnalysis` since it also tracks other analyses now - Introduce asyncanalysis.cpp and move `DefaultValueAnalysis`, `PreservedValueAnalysis` and `AsyncAnalysis` into it - Share the data flow callback between `DefaultValueAnalysis` and `PreservedValueAnalysis` - Rename `fgTrysNotContiguous` -> `fgTrysContiguous` and assert it as part of `DataFlow::ForwardAnalysis` that depends on contiguity
jakobbotsch
commented
Mar 24, 2026
| // Once we have run wasm layout, try regions may no longer be contiguous. | ||
| // | ||
| bool fgTrysNotContiguous() { return fgIndexToBlockMap != nullptr; } | ||
| bool fgTrysContiguous() { return fgIndexToBlockMap == nullptr; } |
Member
Author
There was a problem hiding this comment.
I took the liberty of flipping this to avoid the negation
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors CoreCLR JIT async transformation analysis code by renaming and regrouping the async-related analyses into a dedicated translation unit, while also clarifying and enforcing assumptions around EH try-region contiguity used by forward dataflow.
Changes:
- Renamed
AsyncLivenesstoAsyncAnalysisand movedDefaultValueAnalysis,PreservedValueAnalysis, andAsyncAnalysisinto the newasyncanalysis.cpp. - Shared a single
DataFlow::ForwardAnalysiscallback implementation betweenDefaultValueAnalysisandPreservedValueAnalysis. - Renamed
fgTrysNotContiguoustofgTrysContiguousand added a contiguity assert inDataFlow::ForwardAnalysis; updated EH verification/diagnostics call sites accordingly.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/jit/jiteh.cpp | Updates EH verification logic to use fgTrysContiguous() semantics. |
| src/coreclr/jit/fgdiagnostic.cpp | Updates EH predecessor checking to use fgTrysContiguous() semantics. |
| src/coreclr/jit/dataflow.h | Asserts try-region contiguity as a precondition for forward dataflow. |
| src/coreclr/jit/compiler.h | Renames the contiguity predicate to fgTrysContiguous(). |
| src/coreclr/jit/asyncanalysis.cpp | New file containing async-related analyses and shared dataflow callback. |
| src/coreclr/jit/async.h | Exposes analysis class declarations and renames AsyncLiveness → AsyncAnalysis. |
| src/coreclr/jit/async.cpp | Wires up AsyncAnalysis usage and updates call sites accordingly. |
| src/coreclr/jit/CMakeLists.txt | Adds asyncanalysis.cpp to the JIT build sources. |
Member
Author
|
cc @dotnet/jit-contrib PTAL @AndyAyersMS |
This was referenced Mar 24, 2026
Open
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.
Purely mechanical changes that should be no-diff.
AsyncLiveness->AsyncAnalysissince it also tracks other analyses nowDefaultValueAnalysis,PreservedValueAnalysisandAsyncAnalysisinto itDefaultValueAnalysisandPreservedValueAnalysisfgTrysNotContiguous->fgTrysContiguousand assert it as part ofDataFlow::ForwardAnalysisthat depends on contiguity