-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Remove impResolveToken from implILConsumesAddr #117366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
b16b098 to
a0e2b34
Compare
|
PTAL @jakobbotsch @dotnet/jit-contrib I converted it to a clean up as we discussed, zero diffs. |
There was a problem hiding this 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 updates how the importer checks if an IL instruction consumes an address, removing the old token resolution in favor of a simpler opcode-based check, and adjusts related call sites and helper node creation.
- Changed
impILConsumesAddrsignature to accept avar_typesandcodeEndp, and simplified its implementation to handle onlyCEE_LDFLD. - Updated call in
fgFindJumpTargetsto pass the new parameters and remove the redundant struct check. - Replaced manual clobber-and-rewrite of
op1inimpImportBlockCodewith a singlegtNewLclAddrNodecall. - Updated the function declaration in
compiler.h.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/coreclr/jit/importer.cpp | Updated impILConsumesAddr signature and body; replaced inline address node rewrite with gtNewLclAddrNode. |
| src/coreclr/jit/fgbasic.cpp | Adjusted call to impILConsumesAddr to use new parameters and removed the now-unneeded notStruct local. |
| src/coreclr/jit/compiler.h | Modified impILConsumesAddr declaration to match the new signature. |
Comments suppressed due to low confidence (1)
src/coreclr/jit/importer.cpp:53
- [nitpick] Consider renaming the parameter
typto a more descriptive name likeoperandTypeorvalueTypeto clarify what type it's representing.
bool Compiler::impILConsumesAddr(var_types typ, const BYTE* codeAddr, const BYTE* codeEndp)
Co-authored-by: Jakob Botsch Nielsen <[email protected]>
Apply @jakobbotsch's suggestion