-
Notifications
You must be signed in to change notification settings - Fork 5k
JIT: Handle return buffer definitions in TreeLifeUpdater #116137
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
base: main
Are you sure you want to change the base?
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
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 addresses issue #116135 by handling return buffer definitions in TreeLifeUpdater.
- Removed outdated TODO-Bug comment regarding handling calls with return buffers.
- Added an else-if branch to obtain the return buffer local variable for call trees using gtCallGetDefinedRetBufLclAddr.
Comments suppressed due to low confidence (1)
src/coreclr/jit/treelifeupdater.cpp:307
- Ensure that existing tests cover scenarios where call trees include return buffer definitions. Adding dedicated tests would validate the new behavior introduced in this branch.
else if (tree->IsCall())
@@ -305,6 +304,10 @@ void TreeLifeUpdater<ForCodeGen>::UpdateLife(GenTree* tree) | |||
{ | |||
lclVarTree = tree->AsIndir()->Addr()->AsLclVarCommon(); | |||
} | |||
else if (tree->IsCall()) | |||
{ | |||
lclVarTree = compiler->gtCallGetDefinedRetBufLclAddr(tree->AsCall()); |
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.
[nitpick] Consider adding a comment explaining the purpose and expected behavior of gtCallGetDefinedRetBufLclAddr, to improve maintainability.
Copilot uses AI. Check for mistakes.
cc @dotnet/jit-contrib PTAL @AndyAyersMS Some large Windows TP regressions. Detailed TP diff is:
Appears to be because of different inlining decisions, so will leave that up to native PGO. linux-x64 TP diffs also do not show significant impact. |
Fix #116135