Skip to content

JIT: Expand inlined delegate calls in correct order - #89175

Merged
jakobbotsch merged 1 commit into
dotnet:mainfrom
jakobbotsch:fix-75832
Jul 20, 2023
Merged

JIT: Expand inlined delegate calls in correct order#89175
jakobbotsch merged 1 commit into
dotnet:mainfrom
jakobbotsch:fix-75832

Conversation

@jakobbotsch

@jakobbotschjakobbotsch commented Jul 19, 2023

Copy link
Copy Markdown
Member

The access of the target instance was incorrectly inserted right after the location of the delegate instance. Since this indirection can throw a NRE this is incorrect; to get the proper inlined behavior, the indirection must happen only after all arguments have been evaluated.

Fix#75832

Large number of diffs expected due to reordering, with relatively small overall size-wise diffs.

The access of the target instance was incorrectly inserted right after
the location of the delegate instance. Since this indirection can throw
a NRE this is incorrect; to get the proper inlined behavior, the
indirection must happen only after all arguments have been evaluated.
Fixdotnet#75832
@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 19, 2023
@ghost

Copy link
Copy Markdown

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Issue Details

The access of the target instance was incorrectly inserted right after the location of the delegate instance. Since this indirection can throw a NRE this is incorrect; to get the proper inlined behavior, the indirection must happen only after all arguments have been evaluated.

Fix #75832

Author:jakobbotsch
Assignees:-
Labels:

area-CodeGen-coreclr

Milestone:-

@jakobbotsch

Copy link
Copy Markdown
MemberAuthor

/azp run runtime

@azure-pipelines

Copy link
Copy Markdown

No commit pushedDate could be found for PR 89175 in repo dotnet/runtime

@jakobbotsch

Copy link
Copy Markdown
MemberAuthor

/azp run runtime, runtime-coreclr jitstress, runtime-coreclr libraries-jitstress

@azure-pipelines

Copy link
Copy Markdown

No commit pushedDate could be found for PR 89175 in repo dotnet/runtime

@jakobbotsch

Copy link
Copy Markdown
MemberAuthor

/azp run runtime, runtime-coreclr jitstress, runtime-coreclr libraries-jitstress

@azure-pipelines

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

@jakobbotsch

Copy link
Copy Markdown
MemberAuthor

Failures are known.

Diffs. As expected some minor size-wise diffs, with a large count of diffs due to the reordered IR.

cc @dotnet/jit-contrib PTAL @BruceForstall

@jakobbotsch
jakobbotsch merged commit 3db5172 into dotnet:mainJul 20, 2023
@jakobbotsch
jakobbotsch deleted the fix-75832 branch July 20, 2023 20:29
@ghostghost locked as resolved and limited conversation to collaborators Aug 20, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclrCLR 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: Late expansion of delegate calls can reorder null checks with other argument exceptions

2 participants

@jakobbotsch@BruceForstall