Skip to content

JIT: Defer fgSetOptions until after 2nd-pass EH removal#128573

Merged
AndyAyersMS merged 1 commit into
dotnet:mainfrom
AndyAyersMS:fgsetoptions-after-eh-removal
May 26, 2026
Merged

JIT: Defer fgSetOptions until after 2nd-pass EH removal#128573
AndyAyersMS merged 1 commit into
dotnet:mainfrom
AndyAyersMS:fgsetoptions-after-eh-removal

Conversation

@AndyAyersMS
Copy link
Copy Markdown
Member

The JIT will sometimes commit to fully-interruptible GC too early. Wait until we've had a second chance to remove EH regions.

The JIT will sometimes commit to fully-interruptible GC too early.
Wait until we've had a second chance to remove EH regions.
Copilot AI review requested due to automatic review settings May 26, 2026 00:19
@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 26, 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.

@AndyAyersMS
Copy link
Copy Markdown
Member Author

I was hoping we could wait even longer, until after the optimization passes, but the zero init suppression logic depends on the GC mode.

This helps fix some regressions from #128541.

@EgorBo PTAL
fyi @dotnet/jit-contrib

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 changes the JIT compilation pipeline ordering so fgSetOptions() (which commits to codegen choices like fully-interruptible GC and frame-pointer requirements) runs later, after additional post-morph EH cleanup has had a chance to remove empty EH regions.

Changes:

  • Removed the early fgSetOptions() call from the post-morph phase.
  • Added fgSetOptions() after the second-pass empty-EH removal / post-morph flow work, just before MD array morphing.

Comment thread src/coreclr/jit/compiler.cpp
@AndyAyersMS AndyAyersMS merged commit 6217c1e into dotnet:main May 26, 2026
138 of 141 checks passed
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.

4 participants