Skip to content

Skip interpreter selection when dynamic compilation is unavailable - #134965

Merged
jkoritzinsky merged 2 commits into
mainfrom
dev/jkoritzinsky/interpreter-selection-gating
Oct 2, 2026
Merged

jkoritzinsky merged 2 commits into
mainfrom
dev/jkoritzinsky/interpreter-selection-gating

Conversation

@jkoritzinsky

@jkoritzinsky jkoritzinsky commented Sep 30, 2026 •

Copy link
Copy Markdown
Member
When `FEATURE_DYNAMIC_CODE_COMPILED` is absent, `CILInterp::compileMethod` must interpret every method. Previously it still ran interpreter-versus-JIT selection before deciding to always interpret anyway.

Compile out selection and module tracking when dynamic compilation is unavailable. I chose to keep a cheap unsigned InterpMode range check that preserves rejection of values outside 0-3 with the same exception and failure stage, but we can remove this also to further reduce code size.

Conditional interpreter selection remains unchanged.

Codegen evidence

Independently resolved, matching browser Release WASM binaries and symbol maps show the three selection-only indirect call sites are gone. The compileMethod body decreases from 84,606 to 84,510 bytes, with 194 to 191 indirect call sites. Later compilation metadata queries remain.

Note

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

Guard interpreter-versus-JIT selection and module tracking with FEATURE_DYNAMIC_CODE_COMPILED. Retain invalid InterpMode rejection for interpreter-only builds and preserve JIT-enabled selection behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 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, @BrzVlad, @janvorli
See info in area-owners.md if you want to be subscribed.

Comment thread src/coreclr/interpreter/eeinterp.cpp Outdated
Keep mode selection and validation within FEATURE_DYNAMIC_CODE_COMPILED, avoiding unnecessary mode checks when JIT fallback is unavailable.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jkoritzinsky
jkoritzinsky enabled auto-merge (squash) October 1, 2026 21:44
@jkoritzinsky
jkoritzinsky merged commit 634db21 into main Oct 2, 2026
109 of 111 checks passed
@jkoritzinsky
jkoritzinsky deleted the dev/jkoritzinsky/interpreter-selection-gating branch October 2, 2026 02:26
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants