Skip to content
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

JIT: Rework retbuf handling during inlining #112010

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Jan 30, 2025

Avoid directly capturing the return buffer from the call in the inliner; instead record an actual InlArgInfo entry for the retbuffer. This unifies the handling with how the generic context and other arguments are handled.

Fix #112053

Avoid directly capturing the return buffer from the call in the inliner;
instead record an actual `InlArgInfo` entry for the retbuffer. This
unifies the handling with how the generic context and other arguments
are handled.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 30, 2025
inlCurArgInfo->argHasSideEff = (curArgVal->gtFlags & (GTF_ALL_EFFECT & ~GTF_GLOB_REF)) != 0;
// Retbuffer is very often used directly in a dereference, and this
// generally makes it profitable to duplicate even when it is complex.
argInfo->argDuplicateComplex = true;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just minimizes some regressions, since the old behavior was more aggressive in duplicating the return buffer shape.

@jakobbotsch
Copy link
Member Author

/azp run Fuzzlyn

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JIT: Inliner direct substitution of return buffers can reorder side effects
1 participant