Skip to content

JIT: Use logical local definitions in LIR alias analysis - #137548

Merged
jakobbotsch merged 3 commits into
dotnet:mainfrom
jakobbotsch:nodeinfo-logical-local-writes
Nov 20, 2026
Merged

jakobbotsch merged 3 commits into
dotnet:mainfrom
jakobbotsch:nodeinfo-logical-local-writes

Conversation

@jakobbotsch

@jakobbotsch jakobbotsch commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Make VisitLogicalLocalDefs the source of truth for local writes in
AliasSet::NodeInfo, with a cheap GTF_ASG candidate guard. Keep call memory
effects separate without discarding local-write flags.

Cache only read-local information. Enumerate writes through a lazy definition
visitor, with a small inline adapter for indirect stores through local addresses.
Use this visitor for alias sets, direct interference checks, handler visibility,
and the LIR outstanding-read checker. Direct interference checks allocate no
temporary alias sets and abort on the first interference.

This is an independent prerequisite cleanup for #137358.

Note

This pull request description and implementation were generated with GitHub Copilot.

Use VisitLogicalLocalDefs to classify local writes in NodeInfo.
Keep call memory effects separate and cache only local-read info.

Enumerate writes lazily for alias sets, interference, handler visibility,
and LIR checks. Guard classification with GTF_ASG and avoid temporary
alias sets in direct interference checks.

Checked replay and assembly comparisons show no codegen differences.
Non-PGO Release instruction-count comparison adds 0.043% on PGO benchmarks.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: e5380c17-dca4-4a54-b4bb-16ad9560f1e9
@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 Nov 14, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 5 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@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.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: de29f758-df50-40a9-bf70-a3978983794f
@jakobbotsch

jakobbotsch commented Nov 19, 2026 •

Copy link
Copy Markdown
Member Author

cc @dotnet/jit-contrib PTAL @AndyAyersMS

Diffs, primarily related to the async args being evaluated in a different order. That was needed after we started visiting the async indicator def as part of this (otherwise we hit the "store to local overlaps outstanding read" assert in LIR checks).

With this change we shouldn't need other side effect changes for #137358.

@jakobbotsch

Copy link
Copy Markdown
Member Author

/ba-g Deadletter and infra failures

@jakobbotsch
jakobbotsch merged commit b7ad898 into dotnet:main Nov 20, 2026
125 of 128 checks passed
@jakobbotsch
jakobbotsch deleted the nodeinfo-logical-local-writes branch November 20, 2026 13:42
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 23, 2026
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