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: Compact newly recognized loops #97149

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

jakobbotsch
Copy link
Member

Large diffs expected. Sadly that's just churn until we get a new block layout in the backend, but I do not see an easy way to avoid it if we want to be able to remove old loop finding.

@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 18, 2024
@ghost ghost assigned jakobbotsch Jan 18, 2024
@ghost
Copy link

ghost commented Jan 18, 2024

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

Issue Details

Large diffs expected. Sadly that's just churn until we get a new block layout in the backend, but I do not see an easy way to avoid it if we want to be able to remove old loop finding.

Author: jakobbotsch
Assignees: jakobbotsch
Labels:

area-CodeGen-coreclr

Milestone: -

@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @BruceForstall

Diffs. A significant amount of churn, that I sadly don't have a good idea on how to avoid.
image

Comment on lines +4502 to +4510
// If this is a CALLFINALLYRET that is not in the loop, but the
// CALLFINALLY was, then we have to leave it in place. For compaction
// purposes this doesn't really make any difference, since no codegen
// is associated with the CALLFINALLYRET anyway.
if (cur->isBBCallFinallyPairTail())
{
cur = cur->Next();
continue;
}
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 is an interesting case that can occur since we do not return any EH succeessors for CALLFINALLYRET; if the CALLFINALLY/CALLFINALLYRET is inside a try whose handler loops back around, then the CALLFINALLY may be part of the loop while the CALLFINALLYRET isn't. Here's an example case; red edges are EH successor edges. The CALLFINALLY is BB19 and the CALLFINALLYRET is BB20.

Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

LGTM.

IMO, churn is ok at this point.

@jakobbotsch jakobbotsch merged commit a18d8cd into dotnet:main Jan 19, 2024
125 of 129 checks passed
@jakobbotsch jakobbotsch deleted the compact-new-loops branch January 19, 2024 10:21
tmds pushed a commit to tmds/runtime that referenced this pull request Jan 23, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 19, 2024
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.

2 participants