Skip to content

JIT: update fgReplaceJumpTarget to maintain pred lists#81246

Merged
AndyAyersMS merged 2 commits intodotnet:mainfrom
AndyAyersMS:ReviseFgUpdateJumpTarget
Jan 27, 2023
Merged

JIT: update fgReplaceJumpTarget to maintain pred lists#81246
AndyAyersMS merged 2 commits intodotnet:mainfrom
AndyAyersMS:ReviseFgUpdateJumpTarget

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.
@ghost ghost 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.

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
Contributor

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