Skip to content

JIT: Handle LCL_ADDR in TreeLifeUpdater - #124472

Merged
jakobbotsch merged 4 commits into
dotnet:mainfrom
jakobbotsch:tree-life-updater-addrs
Feb 18, 2026
Merged

jakobbotsch merged 4 commits into
dotnet:mainfrom
jakobbotsch:tree-life-updater-addrs

Conversation

@jakobbotsch

Copy link
Copy Markdown
Member

We wouldn't handle GTF_VAR_DEATH on LCL_ADDR nodes, which would cause us to keep thinking these were live in the async transformation. That wouldn't cause issues but it was conservative.

Copilot AI review requested due to automatic review settings February 16, 2026 16:32
@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 Feb 16, 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 fixes a liveness tracking issue in the JIT's TreeLifeUpdater by adding handling for standalone GT_LCL_ADDR nodes. Previously, GTF_VAR_DEATH flags on GT_LCL_ADDR nodes were not being processed, causing the async transformation to conservatively treat these locals as live longer than necessary.

Changes:

  • Added handling for GT_LCL_ADDR nodes in TreeLifeUpdater<ForCodeGen>::UpdateLife to properly process liveness flags

Comment thread src/coreclr/jit/treelifeupdater.cpp Outdated
Copilot AI review requested due to automatic review settings February 16, 2026 17:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@jakobbotsch

Copy link
Copy Markdown
Member Author

cc @dotnet/jit-contrib PTAL @AndyAyersMS

Diffs

Comment thread src/coreclr/jit/treelifeupdater.cpp Outdated

@AndyAyersMS AndyAyersMS left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Functionally, this looks fine.

Maybe we could adopt a convention where at the invocations sites we note what the true and false method template parameters mean?

Or else use an enum class so we have more descriptive names?

@jakobbotsch

Copy link
Copy Markdown
Member Author

Maybe we could adopt a convention where at the invocations sites we note what the true and false method template parameters mean?

Or else use an enum class so we have more descriptive names?

Sounds reasonable to me... Maybe something for Copilot to do globally.

@jakobbotsch
jakobbotsch merged commit 5679b73 into dotnet:main Feb 18, 2026
121 of 125 checks passed
@jakobbotsch
jakobbotsch deleted the tree-life-updater-addrs branch February 18, 2026 16:20
iremyux pushed a commit to iremyux/dotnet-runtime that referenced this pull request Mar 2, 2026
…4472)

We wouldn't handle `GTF_VAR_DEATH` on `LCL_ADDR` nodes, which would
cause us to keep thinking these were live in the async transformation.
That wouldn't cause issues but it was conservative.
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants