Skip to content

JIT: extend relaxed checks through morph - #132816

Open
AndyAyersMS wants to merge 3 commits into
dotnet:mainfrom
AndyAyersMS:jit-relaxed-checks-through-morph
Open

JIT: extend relaxed checks through morph#132816
AndyAyersMS wants to merge 3 commits into
dotnet:mainfrom
AndyAyersMS:jit-relaxed-checks-through-morph

Conversation

@AndyAyersMS

Copy link
Copy Markdown
Member

Summary

  • extend relaxed IR flag checking through global morph
  • refresh statement side effects after local morph changes
  • preserve required flags during inlining and object allocation rewrites

Testing

  • x64 Checked JIT build
  • full SuperPMI replay
  • jit-format

Note

This pull request description was generated with GitHub Copilot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@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 Aug 27, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 5 pipeline(s).
11 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.

Comment thread src/coreclr/jit/lclmorph.cpp Outdated
Comment thread src/coreclr/jit/fginline.cpp Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AndyAyersMS
AndyAyersMS marked this pull request as ready for review August 27, 2026 18:28
Copilot AI lite review requested due to automatic review settings August 27, 2026 18:28
@azure-pipelines

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

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 adjusts JIT IR flag validation so “relaxed” flag checking remains enabled through global morph, while adding a few targeted updates to keep side-effect/flag information consistent across transformations (local morph, inlining, object allocation rewrites). It also tweaks DEBUG-only diagnostics to tolerate a temporary inconsistency during implicit-byref retyping and preserves an additional block flag during block compaction.

Changes:

  • Keep PhaseChecks::CHECK_IR_RELAXED enabled beyond indirect-call transformation and disable it after global morph to restore strict invariants.
  • Refresh per-statement side-effect flags after local morph statement rewrites and propagate effect flags in an inlining walker.
  • Adjust DEBUG checks for temporarily stale implicit-byref STORE_LCL_FLD invariants and preserve BBF_RECURSIVE_TAILCALL when compacting blocks.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/coreclr/jit/objectalloc.cpp Marks a sunk indirection as GTF_IND_NONFAULTING after extracting side effects.
src/coreclr/jit/lclmorph.cpp Updates statement side effects after local morph changes; adjusts local-address def flags.
src/coreclr/jit/fginline.cpp Propagates child effect flags to the parent after late devirtualization updates.
src/coreclr/jit/fgdiagnostic.cpp DEBUG-only IR validation tweaks (implicit-byref stale window; node-threading check gating).
src/coreclr/jit/compiler.h Adds DEBUG-only state to track the implicit-byref “stale lcl fld” window.
src/coreclr/jit/compiler.cpp Extends relaxed IR checking through global morph and disables it afterwards.
src/coreclr/jit/block.h Preserves BBF_RECURSIVE_TAILCALL when compacting blocks.

Comment thread src/coreclr/jit/lclmorph.cpp Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 28, 2026 19:53

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 7 out of 7 changed files in this pull request and generated 1 comment.

Comment thread src/coreclr/jit/objectalloc.cpp
@AndyAyersMS

Copy link
Copy Markdown
Member Author

diffs are fairly minimal.

TP is about 0.1%, not sure I can get any lower.

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.

3 participants