Uh oh!
There was an error while loading. Please reload this page.
JIT: Move invariant nodes and LCL_VARs in LiftLIREdges - #128250
Conversation
Invariant nodes and LCL_VARs do not need to be lifted across async calls.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
There was a problem hiding this comment.
Pull request overview
This PR updates CoreCLR JIT async state machine lowering (AsyncTransformation::LiftLIREdges) to avoid lifting certain “live LIR edge” values across async suspension points by moving them closer to their use instead of materializing spill locals.
Changes:
- Move invariant nodes (
GenTree::IsInvariant) to just before their use so they are no longer live across the async call. - Attempt to treat some
GT_LCL_VARnodes similarly (skip lift if the local isn’t address-exposed) by relocating the node instead of spilling to a new temp local.
Uh oh!
There was an error while loading. Please reload this page.
jakobbotsch
commented
May 18, 2026
cc @dotnet/jit-contrib PTAL @EgorBo No actual diffs. That's because we spill runtime async calls aggressively in the frontend. But addresses the TODO, and more importantly, fixes an assert that I am seeing in #128152 where we have a |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Invariant nodes and LCL_VARs do not need to be lifted across async calls.
Prerequisite for #128152 since it ensures we do not lift
LCL_ADDRdefs.