Skip to content

JIT: Move invariant nodes and LCL_VARs in LiftLIREdges#128250

Draft
jakobbotsch wants to merge 2 commits into
dotnet:mainfrom
jakobbotsch:move-invariant-nodes-async
Draft

JIT: Move invariant nodes and LCL_VARs in LiftLIREdges#128250
jakobbotsch wants to merge 2 commits into
dotnet:mainfrom
jakobbotsch:move-invariant-nodes-async

Conversation

@jakobbotsch
Copy link
Copy Markdown
Member

@jakobbotsch jakobbotsch commented May 15, 2026

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_ADDR defs.

Invariant nodes and LCL_VARs do not need to be lifted across async
calls.
Copilot AI review requested due to automatic review settings May 15, 2026 11:08
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 15, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_VAR nodes similarly (skip lift if the local isn’t address-exposed) by relocating the node instead of spilling to a new temp local.

Comment thread src/coreclr/jit/async.cpp Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants