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: update fgReplaceJumpTarget to maintain pred lists #81246

Merged
merged 2 commits into from
Jan 27, 2023

Conversation

AndyAyersMS
Copy link
Member

This is used some early phases; make it pred list aware.

Contributes to #80193.

This is used some early phases; make it pred list aware.

Contributes to dotnet#80193.
@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 26, 2023
@ghost ghost assigned AndyAyersMS Jan 26, 2023
@ghost
Copy link

ghost commented Jan 26, 2023

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

Issue Details

This is used some early phases; make it pred list aware.

Contributes to #80193.

Author: AndyAyersMS
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

@BruceForstall PTAL
cc @dotnet/jit-contrib

Seems like we also might be able to use this in place of fgReplaceSwitchJumpTarget but will leave that for a follow-up.

@@ -559,11 +557,17 @@ void Compiler::fgReplaceJumpTarget(BasicBlock* block, BasicBlock* newTarget, Bas
case BBJ_ALWAYS:
case BBJ_EHCATCHRET:
case BBJ_EHFILTERRET:
case BBJ_LEAVE: // This function will be called before import, so we still have BBJ_LEAVE
case BBJ_LEAVE: // This function can be called before import, so we still have BBJ_LEAVE
Copy link
Member

Choose a reason for hiding this comment

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

The changes in this function look fine, but also it seems weird BBJ_NONE/etc. case don't assert unreached.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me fix this.

It's also a bit odd that even block has a reasonable jump kind this method can silently do nothing if block doesn't jump to oldTarget, but there are places we rely on this behavior right now.

@AndyAyersMS
Copy link
Member Author

/azp run runtime-coreclr jitstress

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AndyAyersMS AndyAyersMS merged commit 5cc02f6 into dotnet:main Jan 27, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Feb 27, 2023
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