You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JIT: We should try to maintain full defs through async liveness #133415
When we decompose stores physical promotion will often end up introducing STORE_LCL_FLDs if the destination was not fully promoted. Unfortunately these often result in async liveness thinking that the stores are partial, even though the full set is actually a full definition. This can then lead to unnecessary state being retained.
To fixes I can think of:
Try to make async liveness more precise and track per-field state
Instead of creating a set of STORE_LCL_FLD on decomposition, instead create STORE_LCL_VAR(FIELD_LIST(...)) and then expand it in lowering.
Physical promotion removed the whole initialization and retained only the necessary field definitions. A later whole-struct use of V35 then looked upward-exposed, so liveness carried the previous loop iteration's value.
The STORE_LCL_FLD nodes are partial definitions and do not contribute a full parent-local definition during non-SSA async liveness. Consequently, the later whole V103 argument use was no longer a last use, and V103 appeared live through the loop and across every suspension.
Activity
dotnet-policy-service commentedon Sep 8, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
jakobbotsch commentedon Sep 8, 2026
I saw this problem in two places when looking at hot ASP.NET methods and asked copilot to summarize them:
ValueTask<ReadResult>constructor temporary insidePipe.ReadAsyncThe IR initially contained a whole zero-initialization followed by constructor field stores:
Physical promotion removed the whole initialization and retained only the necessary field definitions. A later whole-struct use of
V35then looked upward-exposed, so liveness carried the previous loop iteration's value.TransparentAwaitinline argumentThe inliner initially generated a complete copy:
The argument was subsequently used by:
Physical promotion replaced the whole copy with:
The
STORE_LCL_FLDnodes are partial definitions and do not contribute a full parent-local definition during non-SSA async liveness. Consequently, the later wholeV103argument use was no longer a last use, andV103appeared live through the loop and across every suspension.