Skip to content

JIT: Rework retbuf handling during inlining - #112010

Closed
jakobbotsch wants to merge 6 commits into
dotnet:mainfrom
jakobbotsch:inline-retbufs
Closed

jakobbotsch wants to merge 6 commits into
dotnet:mainfrom
jakobbotsch:inline-retbufs

Conversation

@jakobbotsch

@jakobbotsch jakobbotsch commented Jan 30, 2025 •

Copy link
Copy Markdown
Member

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.
@ghost ghost 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
Copy Markdown
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
Copy Markdown
Member Author

/azp run Fuzzlyn

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Draft Pull Request was automatically closed for 30 days of inactivity. Please let us know if you'd like to reopen it.

@github-actions github-actions Bot locked and limited conversation to collaborators Apr 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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