-
Notifications
You must be signed in to change notification settings - Fork 5.3k
JIT: Remove redundant normalizing casts when passing and returning structs #118345
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
|
/azp run Fuzzlyn |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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 change optimizes the JIT by removing redundant normalizing casts when returning promoted structs. It addresses a performance regression introduced by #113178 which forced all returned promoted structs to use FIELD_LIST morphing, leading to unnecessary normalization that didn't exist in the previous LowerRetSingleRegStructLclVar code path.
Key changes:
- Removes
genActualType()call when determining register types for return field lists - Adds optimization logic to eliminate unnecessary casts on the last register entry when returning structs
|
cc @dotnet/jit-contrib PTAL @amanasifkhalid Opened #118377 for the Fuzzlyn issue. Diffs. Pretty minor, but affects the micro benchmark. |
#113178 switched returned promoted structs to always be morphed to
FIELD_LISTand started handling the introducedFIELD_LISTin the backend. However, this change introduced new unnecessary normalization when returning promoted structs that previously would not happen with the oldLowerRetSingleRegStructLclVarcode path.This change adds an optimization to get rid of the introduced normalization when possible.
Fix #113382
For the benchmark: