Migrate interpreter stack maps to InterpCompiler and use them in place of CORINFO_FLG_CONTAINS_GC_PTR#118860
Merged
kg merged 3 commits intodotnet:mainfrom Aug 20, 2025
Merged
Migrate interpreter stack maps to InterpCompiler and use them in place of CORINFO_FLG_CONTAINS_GC_PTR#118860kg merged 3 commits intodotnet:mainfrom
kg merged 3 commits intodotnet:mainfrom
Conversation
…owned by the compiler
Contributor
|
Tagging subscribers to this area: @BrzVlad, @janvorli, @kg |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR migrates interpreter stack maps from a global thread-local cache to being managed per-compiler instance, and replaces usage of the CORINFO_FLG_CONTAINS_GC_PTR flag with direct stack map slot count checks. This addresses issues #117774 and #117062 related to interpreter stack map management.
Key changes:
- Removes global thread-local stack map lookup cache and associated helper function
- Moves stack map management into the
InterpCompilerclass as an instance member - Replaces
CORINFO_FLG_CONTAINS_GC_PTRflag checks with stack map slot count comparisons
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/coreclr/interpreter/stackmap.h |
Removes global GetInterpreterStackMap function declaration |
src/coreclr/interpreter/stackmap.cpp |
Removes thread-local cache and global helper function implementation |
src/coreclr/interpreter/compileropt.cpp |
Adds stackmap include and updates GC pointer detection logic |
src/coreclr/interpreter/compiler.h |
Adds stack map cache member and method declaration to InterpCompiler |
src/coreclr/interpreter/compiler.cpp |
Implements instance-based stack map management and updates all call sites |
Add optional ValueDestroyCallback ctor arg to dn_simdhash_ptr_ptr_holder
This was referenced Aug 19, 2025
BrzVlad
approved these changes
Aug 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #117774 and #117062